Fix #8526 - Implement obq and ob*

This commit is contained in:
pancake 2018-01-08 10:28:32 +01:00
parent 0036b2cae8
commit 6379d18894
2 changed files with 11 additions and 0 deletions

View File

@ -3362,6 +3362,16 @@ static int r_core_bin_file_print(RCore *core, RBinFile *binfile, int mode) {
return false;
}
switch (mode) {
case '*':
r_list_foreach (binfile->objs, iter, obj) {
r_cons_printf ("oba 0x%08"PFMT64x" %s # %d\n", obj->boffset, name, obj->id);
}
break;
case 'q':
r_list_foreach (binfile->objs, iter, obj) {
r_cons_printf ("%d\n", obj->id);
}
break;
case 'j':
r_cons_printf ("{\"name\":\"%s\",\"fd\":%d,\"id\":%d,\"size\":%d,\"objs\":[",
name, fd, id, bin_sz);

View File

@ -269,6 +269,7 @@ static void cmd_open_bin(RCore *core, const char *input) {
switch (input[1]) {
case '\0': // "ob"
case 'q': // "obj"
case 'j': // "obj"
case '*': // "ob*"
r_core_bin_list (core, input[1]);