27 rz_list_foreach (zones, it, item) {
65 for (child = json->
children.first; child; child = child->
next) {
69 if (strcmp(child->
key,
"from") == 0) {
70 item->
from = child->
num.u_value;
71 }
else if (strcmp(child->
key,
"to") == 0) {
72 item->
to = child->
num.u_value;
130 sdb_set(db,
"realnames", flag->realnames ?
"1" :
"0", 0);
166 bool offset_set =
false;
167 bool size_set =
false;
170 case FLAG_FIELD_REALNAME:
171 if (child->type != RZ_JSON_STRING) {
174 proto.
realname = (
char *)child->str_value;
180 proto.
demangled = child->num.u_value != 0;
186 proto.
offset = child->num.u_value;
193 proto.
size = child->num.u_value;
200 proto.
space = rz_flag_space_get(
ctx->flag, child->str_value);
206 proto.
color = (
char *)child->str_value;
212 proto.
comment = (
char *)child->str_value;
218 proto.
alias = (
char *)child->str_value;
225 if (!offset_set || !size_set) {
231 if (proto.realname) {
235 item->
space = proto.space;
278 flag->base = strtoll(
str,
NULL, 0);
285 flag->realnames = strtoul(
str,
NULL, 0) ?
true :
false;
287 Sdb *spaces_db =
sdb_ns(db,
"spaces",
false);
296 Sdb *tags_db =
sdb_ns(db,
"tags",
false);
303 Sdb *zones_db =
sdb_ns(db,
"zones",
false);
313 Sdb *flags_db =
sdb_ns(db,
"flags",
false);
RZ_API const char * rz_flag_item_set_color(RzFlagItem *item, const char *color)
RZ_API void rz_flag_item_set_comment(RzFlagItem *item, const char *comment)
RZ_API void rz_flag_item_set_alias(RzFlagItem *item, const char *alias)
RZ_API RzFlagItem * rz_flag_set(RzFlag *f, const char *name, ut64 off, ut32 size)
RZ_API void rz_flag_unset_all(RzFlag *f)
RZ_API void rz_flag_item_set_realname(RzFlagItem *item, const char *realname)
RZ_API void rz_flag_foreach(RzFlag *f, RzFlagItemCb cb, void *user)
RZ_API void Ht_() free(HtName_(Ht) *ht)
static void list(RzEgg *egg)
RZ_API RZ_BORROW RzListIter * rz_list_append(RZ_NONNULL RzList *list, void *data)
Appends at the end of the list a new element.
RZ_API void rz_list_purge(RZ_NONNULL RzList *list)
Empties the list without freeing the list pointer.
return strdup("=SP r13\n" "=LR r14\n" "=PC r15\n" "=A0 r0\n" "=A1 r1\n" "=A2 r2\n" "=A3 r3\n" "=ZF zf\n" "=SF nf\n" "=OF vf\n" "=CF cf\n" "=SN or0\n" "gpr lr .32 56 0\n" "gpr pc .32 60 0\n" "gpr cpsr .32 64 0 ____tfiae_________________qvczn\n" "gpr or0 .32 68 0\n" "gpr tf .1 64.5 0 thumb\n" "gpr ef .1 64.9 0 endian\n" "gpr jf .1 64.24 0 java\n" "gpr qf .1 64.27 0 sticky_overflow\n" "gpr vf .1 64.28 0 overflow\n" "gpr cf .1 64.29 0 carry\n" "gpr zf .1 64.30 0 zero\n" "gpr nf .1 64.31 0 negative\n" "gpr itc .4 64.10 0 if_then_count\n" "gpr gef .4 64.16 0 great_or_equal\n" "gpr r0 .32 0 0\n" "gpr r1 .32 4 0\n" "gpr r2 .32 8 0\n" "gpr r3 .32 12 0\n" "gpr r4 .32 16 0\n" "gpr r5 .32 20 0\n" "gpr r6 .32 24 0\n" "gpr r7 .32 28 0\n" "gpr r8 .32 32 0\n" "gpr r9 .32 36 0\n" "gpr r10 .32 40 0\n" "gpr r11 .32 44 0\n" "gpr r12 .32 48 0\n" "gpr r13 .32 52 0\n" "gpr r14 .32 56 0\n" "gpr r15 .32 60 0\n" "gpr r16 .32 64 0\n" "gpr r17 .32 68 0\n")
RZ_API Sdb * sdb_ns(Sdb *s, const char *name, int create)
#define rz_return_val_if_fail(expr, val)
RZ_API RzJson * rz_json_parse(char *text)
RZ_API void rz_json_free(RzJson *js)
RZ_API PJ * pj_kb(PJ *j, const char *k, bool v)
RZ_API PJ * pj_end(PJ *j)
RZ_API const char * pj_string(PJ *pj)
RZ_API void pj_free(PJ *j)
RZ_API PJ * pj_ks(PJ *j, const char *k, const char *v)
RZ_API PJ * pj_kn(PJ *j, const char *k, ut64 n)
static void rz_key_parser_add(RzKeyParser *parser, const char *key, int val)
HtPP RzKeyParser
Hashtable-based key parser to prevent strcmp chains.
static RzKeyParser * rz_key_parser_new(void)
#define RZ_SERIALIZE_ERR(res,...)
Push an error to the local RzSerializeResultInfo \res RzSerializeInfoResult *.
#define RZ_KEY_PARSER_JSON(parser, json, child, body)
Iterate over all keys in a json object and call RZ_KEY_PARSER_SWITCH on each.
static void rz_key_parser_free(RzKeyParser *parser)
RZ_API bool rz_serialize_spaces_load(RZ_NONNULL Sdb *db, RZ_NONNULL RzSpaces *spaces, bool load_name, RZ_NULLABLE RzSerializeResultInfo *res)
RZ_API void rz_serialize_spaces_save(RZ_NONNULL Sdb *db, RZ_NONNULL RzSpaces *spaces)
RZ_API int sdb_set(Sdb *s, const char *key, const char *val, ut32 cas)
RZ_API const char * sdb_const_get(Sdb *s, const char *key, ut32 *cas)
RZ_API void sdb_copy(Sdb *src, Sdb *dst)
RZ_API bool sdb_foreach(Sdb *s, SdbForeachCallback cb, void *user)
static bool zone_load_cb(void *user, const char *k, const char *v)
static bool flag_load_cb(void *user, const char *k, const char *v)
RZ_API bool rz_serialize_flag_zones_load(RZ_NONNULL Sdb *db, RZ_NONNULL RzList *zones, RZ_NULLABLE RzSerializeResultInfo *res)
RZ_API void rz_serialize_flag_save(RZ_NONNULL Sdb *db, RZ_NONNULL RzFlag *flag)
RZ_API bool rz_serialize_flag_load(RZ_NONNULL Sdb *db, RZ_NONNULL RzFlag *flag, RZ_NULLABLE RzSerializeResultInfo *res)
RZ_API void rz_serialize_flag_zones_save(RZ_NONNULL Sdb *db, RZ_NONNULL RzList *zones)
static bool load_flags(RZ_NONNULL Sdb *flags_db, RZ_NONNULL RzFlag *flag)
static bool flag_save_cb(RzFlagItem *flag, void *user)
struct rz_json_t::@304::@307 children
struct rz_json_t::@304::@306 num
if(dbg->bits==RZ_SYS_BITS_64)
RZ_API bool rz_flag_zone_reset(RzFlag *f)