Fixed failure in bp placement when no architecture plugin is available ##debug

The r_bp_get_bytes check in r_bp_add made it impossible to set a
breakpoint for an architecture without a bp plugin even though the debug
backend might support setting a breakpoint.
This commit is contained in:
yossizap 2020-11-28 20:46:19 +00:00 committed by Anton Kochkov
parent c6f4af979a
commit fd0dcd5370
2 changed files with 0 additions and 5 deletions

View File

@ -194,14 +194,10 @@ static RBreakpointItem *r_bp_add(RBreakpoint *bp, const ut8 *obytes, ut64 addr,
} else {
b->obytes = NULL;
}
/* XXX: endian .. use bp->endian */
ret = r_bp_get_bytes (bp, b->bbytes, size, bp->endian, 0);
if (ret != size) {
eprintf ("Cannot get breakpoint bytes. No architecture selected?\n");
unlinkBreakpoint (bp, b);
return NULL;
}
b->recoil = ret;
}
bp->nbps++;
r_list_append (bp->bps, b);

View File

@ -46,7 +46,6 @@ typedef struct r_bp_item_t {
ut64 addr;
ut64 delta;
int size; /* size of breakpoint area */
int recoil; /* recoil */
bool swstep; /* is this breakpoint from a swstep? */
int perm;
int hw;