Improve info in lsbrk() command
This commit is contained in:
14
debugus.c
14
debugus.c
@@ -354,9 +354,17 @@ void dbg_js_lsbrk(js_State *js)
|
|||||||
for (int i = 0; i < dbg->brks.capacity; i++) {
|
for (int i = 0; i < dbg->brks.capacity; i++) {
|
||||||
if (dbg->brks.buckets[i] != NULL) {
|
if (dbg->brks.buckets[i] != NULL) {
|
||||||
Brk *brk = (Brk*)dbg->brks.buckets[i]->value;
|
Brk *brk = (Brk*)dbg->brks.buckets[i]->value;
|
||||||
LOG_INF("Breakpoint %d (%s) at 0x%"PRIxPTR" (%s)\n",
|
|
||||||
c+1, dbg->brks.buckets[i]->key, brk->addr,
|
AddrInfo *ai = libelfin_wrap_info_from_rip(dbg->plibelfin, brk->addr - dbg->program_load_offset);
|
||||||
brk->enabled ? "Enabled" : "Disabled");
|
if (ai != NULL) {
|
||||||
|
LOG_INF("Breakpoint %d at 0x%"PRIxPTR" (%s) %s:%zu\n",
|
||||||
|
c+1, brk->addr, brk->enabled ? "Enabled" : "Disabled",
|
||||||
|
ai->file, (size_t)ai->line);
|
||||||
|
libelfin_wrap_free_info(ai);
|
||||||
|
} else {
|
||||||
|
LOG_INF("Breakpoint %d at 0x%"PRIxPTR" (%s)\n",
|
||||||
|
c+1, brk->addr, brk->enabled ? "Enabled" : "Disabled");
|
||||||
|
}
|
||||||
c++;
|
c++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user