Skip to content

Commit

Permalink
Fix GDB AVR
Browse files Browse the repository at this point in the history
  • Loading branch information
XVilka committed Aug 21, 2015
1 parent e774d33 commit cc5ae7f
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions libr/debug/p/debug_gdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@ static int r_debug_gdb_wait(RDebug *dbg, int pid) {

static int r_debug_gdb_attach(RDebug *dbg, int pid) {
RIODesc *d = dbg->iob.io->desc;
// TODO: the core must update the dbg.swstep config var when this var is changed
dbg->swstep = R_FALSE;
eprintf ("XWJSTEP TOFALSE\n");
// TODO: the core must update the dbg.swstep config var when this var is changed
dbg->swstep = R_FALSE;
//eprintf ("XWJSTEP TOFALSE\n");
if (d && d->plugin && d->plugin->name && d->data) {
if (!strcmp ("gdb", d->plugin->name)) {
RIOGdb *g = d->data;
Expand Down Expand Up @@ -162,6 +162,14 @@ eprintf ("XWJSTEP TOFALSE\n");
return R_FALSE;
}
break;
case R_SYS_ARCH_AVR:
if (dbg->anal->bits == 16) {
gdbr_set_architecture(&g->desc, AVR);
} else {
eprintf("Not supported register profile\n");
return R_FALSE;
}
break;
}
} else {
eprintf ("ERROR: Underlaying IO descriptor is not a GDB one..\n");
Expand Down

0 comments on commit cc5ae7f

Please sign in to comment.