Add asm.linesright to show lines before opcode instead of offset

This commit is contained in:
pancake 2012-12-19 01:28:34 +01:00
parent 0f6b4e34e1
commit 51b7147df6
3 changed files with 6 additions and 2 deletions

View File

@ -11,6 +11,7 @@
static int disassemble(RAsm *a, RAsmOp *op, const ut8 *buf, ut64 len) {
// TODO: support bitsize opcodes
// rarvm_disassemble (&b, str);
return 0;
}

View File

@ -519,6 +519,8 @@ R_API int r_core_config_init(RCore *core) {
r_config_desc (cfg, "asm.segoff", "show segmented address in prompt (x86-16)");
r_config_set (cfg, "asm.lines", "true");
r_config_desc (cfg, "asm.lines", "If enabled show ascci-art lines at disassembly");
r_config_set (cfg, "asm.linesright", "false");
r_config_desc (cfg, "asm.linesright", "If enabled show lines before opcode instead of offset");
r_config_set (cfg, "asm.linesout", "true");
r_config_desc (cfg, "asm.linesout", "If enabled show out of block lines");
r_config_set (cfg, "asm.linesstyle", "false");

View File

@ -66,6 +66,7 @@ R_API int r_core_print_disasm(RPrint *p, RCore *core, ut64 addr, ut8 *buf, int l
int filter = r_config_get_i (core->config, "asm.filter");
int varsub = r_config_get_i (core->config, "asm.varsub");
int show_lines = r_config_get_i (core->config, "asm.lines");
int linesright = r_config_get_i (core->config, "asm.linesright");
#warning asm.dwarf is now marked as experimental and disabled
int show_dwarf = 0; // r_config_get_i (core->config, "asm.dwarf");
int show_linescall = r_config_get_i (core->config, "asm.linescall");
@ -409,8 +410,7 @@ toro:
else r_cons_printf ("%s:\n", flag->name);
}
}
if (show_lines && line)
r_cons_strcat (line);
if (!linesright && show_lines && line) r_cons_strcat (line);
if (show_offset)
printoffset (at, show_color, (at==dest), show_offseg);
if (show_size)
@ -528,6 +528,7 @@ toro:
free (str);
}
if (linesright && show_lines && line) r_cons_strcat (line);
if (show_color) {
switch (analop.type) {
case R_ANAL_OP_TYPE_NOP: