mirror of
https://github.com/radareorg/radare2.git
synced 2024-12-28 16:53:36 +00:00
add pib command for basic block level disassembly (#7508)
This commit is contained in:
parent
7d7c9cb5a7
commit
a68254d76a
@ -3317,7 +3317,7 @@ static int cmd_print(void *data, const char *input) {
|
||||
// r_cons_printf ("|Usage: pi[defj] [num]\n");
|
||||
{
|
||||
const char *help_msg[] = {
|
||||
"Usage:", "pi[defrj] [num]", "",
|
||||
"Usage:", "pi[bdefrj] [num]", "",
|
||||
"pir", "", "like 'pdr' but with 'pI' output",
|
||||
NULL
|
||||
};
|
||||
@ -3374,6 +3374,17 @@ static int cmd_print(void *data, const char *input) {
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'b': //pib
|
||||
{
|
||||
RAnalBlock *b = r_anal_bb_from_offset (core->anal, core->offset);
|
||||
if (b) {
|
||||
r_core_print_disasm_instructions (core, b->size - (core->offset - b->addr), 0);
|
||||
} else {
|
||||
eprintf ("Cannot find function at 0x%08"PFMT64x "\n", core->offset);
|
||||
core->num->value = 0;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (l != 0) {
|
||||
r_core_print_disasm_instructions (core, 0, l);
|
||||
|
Loading…
Reference in New Issue
Block a user