18 rz_list_foreach (bp->bps,
iter, bp_item) {
134 bp_item_temp.
addr = strtoull(
k,
NULL, 0);
138 if (child->type != RZ_JSON_STRING) {
141 bp_item_temp.
name = (
char *)child->str_value;
147 bp_item_temp.
module_name = (
char *)child->str_value;
159 bp_item_temp.
delta = child->num.u_value;
165 bp_item_temp.
size = (
int)child->num.s_value;
171 bp_item_temp.
swstep = child->num.u_value ?
true :
false;
177 bp_item_temp.
perm = (
int)child->num.s_value;
183 bp_item_temp.
hw = (
int)child->num.s_value;
189 bp_item_temp.
trace = (
int)child->num.s_value;
195 bp_item_temp.
internal = (
int)child->num.s_value;
201 bp_item_temp.
enabled = (
int)child->num.s_value;
207 bp_item_temp.
togglehits = (
int)child->num.s_value;
213 bp_item_temp.
hits = (
int)child->num.s_value;
220 for (
const RzJson *pid_child = child->
children.first; pid_child; pid_child = pid_child->next) {
221 if (index >= RZ_BP_MAXPIDS) {
224 bp_item_temp.
pids[index] = (
int)pid_child->num.s_value;
232 bp_item_temp.data = (
char *)child->str_value;
238 bp_item_temp.cond = (
char *)child->str_value;
244 bp_item_temp.expr = (
char *)child->str_value;
249 if (bp_item_temp.hw) {
250 bp_item =
rz_bp_add_hw(
ctx->bp, bp_item_temp.addr, bp_item_temp.size, bp_item_temp.perm);
252 bp_item =
rz_bp_add_sw(
ctx->bp, bp_item_temp.addr, bp_item_temp.size, bp_item_temp.perm);
258 if (bp_item_temp.name) {
259 bp_item->name =
strdup(bp_item_temp.name);
261 if (bp_item_temp.module_name) {
262 bp_item->module_name =
strdup(bp_item_temp.module_name);
264 bp_item->module_delta = bp_item_temp.module_delta;
265 bp_item->delta = bp_item_temp.delta;
266 bp_item->swstep = bp_item_temp.swstep;
267 bp_item->hw = bp_item_temp.hw;
268 bp_item->trace = bp_item_temp.trace;
269 bp_item->internal = bp_item_temp.internal;
270 bp_item->enabled = bp_item_temp.enabled;
271 bp_item->togglehits = bp_item_temp.togglehits;
272 bp_item->hits = bp_item_temp.hits;
274 bp_item->pids[
i] = bp_item_temp.pids[
i];
276 if (bp_item_temp.data) {
277 bp_item->data =
strdup(bp_item_temp.data);
279 if (bp_item_temp.cond) {
280 bp_item->cond =
strdup(bp_item_temp.cond);
282 if (bp_item_temp.expr) {
283 bp_item->expr =
strdup(bp_item_temp.expr);
RZ_API bool rz_bp_del_all(RzBreakpoint *bp)
RZ_API RzBreakpointItem * rz_bp_add_hw(RzBreakpoint *bp, ut64 addr, int size, int perm)
RZ_API RZ_BORROW RzBreakpointItem * rz_bp_add_sw(RZ_NONNULL RzBreakpoint *bp, ut64 addr, int size, int perm)
Add a software breakpoint size preferred size of the breakpoint, or 0 to determine automatically.
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void static offset struct stat static buf void long static basep static whence static length const void static len key
RZ_API void Ht_() free(HtName_(Ht) *ht)
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")
#define rz_return_if_fail(expr)
#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_ka(PJ *j, const char *k)
RZ_API PJ * pj_kb(PJ *j, const char *k, bool v)
RZ_API PJ * pj_ki(PJ *j, const char *k, int d)
RZ_API PJ * pj_end(PJ *j)
RZ_API const char * pj_string(PJ *pj)
RZ_API PJ * pj_i(PJ *j, int d)
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)
RZ_API PJ * pj_kN(PJ *j, const char *k, st64 n)
static void rz_key_parser_add(RzKeyParser *parser, const char *key, int val)
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)
#define rz_strf(buf,...)
Convenience macro for local temporary strings.
RZ_API int sdb_set(Sdb *s, const char *key, const char *val, ut32 cas)
RZ_API bool sdb_foreach(Sdb *s, SdbForeachCallback cb, void *user)
static bool bp_load_cb(void *user, const char *k, const char *v)
RZ_API bool rz_serialize_bp_load(RZ_NONNULL Sdb *db, RZ_NONNULL RzBreakpoint *bp, RZ_NULLABLE RzSerializeResultInfo *res)
Load a serialized breakpoints to a RzBreakpoint instance.
RZ_API void rz_serialize_bp_save(RZ_NONNULL Sdb *db, RZ_NONNULL RzBreakpoint *bp)
serialize and save the breakpoints in a sdb
RZ_API RzSerializeBpParser rz_serialize_bp_parser_new(void)
Create a new RzSerializeBpParser instance.
RzSerializeBpParser parser
struct rz_json_t::@304::@307 children
if(dbg->bits==RZ_SYS_BITS_64)