aboutsummaryrefslogtreecommitdiff
path: root/gdb/tui
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/tui')
-rw-r--r--gdb/tui/tui-disasm.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/tui/tui-disasm.c b/gdb/tui/tui-disasm.c
index 7178326..8d5512e 100644
--- a/gdb/tui/tui-disasm.c
+++ b/gdb/tui/tui-disasm.c
@@ -47,6 +47,7 @@ struct tui_asm_line
{
CORE_ADDR addr;
std::string addr_string;
+ size_t addr_size;
std::string insn;
};
@@ -110,6 +111,7 @@ tui_disassemble (struct gdbarch *gdbarch,
else
new_size = asm_lines[pos + i].addr_string.size ();
*addr_size = std::max (*addr_size, new_size);
+ asm_lines[pos + i].addr_size = new_size;
}
pc = pc + gdb_print_insn (gdbarch, pc, &gdb_dis_out, NULL);
@@ -239,8 +241,7 @@ tui_disasm_window::set_contents (struct gdbarch *arch,
std::string line
= (asm_lines[i].addr_string
- + n_spaces (insn_pos
- - asm_lines[i].addr_string.size ())
+ + n_spaces (insn_pos - asm_lines[i].addr_size)
+ asm_lines[i].insn);
const char *ptr = line.c_str ();