aboutsummaryrefslogtreecommitdiff
path: root/gdb/disasm.c
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2020-07-21 11:21:50 +0100
committerAndrew Burgess <andrew.burgess@embecosm.com>2020-07-23 11:16:50 +0100
commit78344df7b5d7d7fcf6aa7945b8c4b56bcc9388ce (patch)
tree08db40497223153f12e24b7cc0a64a63bebb378c /gdb/disasm.c
parent25dfed247b09f2e5c9672a8737c8208ff90928bf (diff)
downloadfsf-binutils-gdb-78344df7b5d7d7fcf6aa7945b8c4b56bcc9388ce.zip
fsf-binutils-gdb-78344df7b5d7d7fcf6aa7945b8c4b56bcc9388ce.tar.gz
fsf-binutils-gdb-78344df7b5d7d7fcf6aa7945b8c4b56bcc9388ce.tar.bz2
gdb/disassembly: Update to handle non-statement addresses
After the introduction of support for non-statement addresses in the line table, the output for 'disassemble /m' can be broken in some cases. With the /m format disassembly GDB associates a set of addresses with each line, these addresses are then sorted and printed for each line. When the non-statement support was added GDB was incorrectly told to ignore non-statement instructions, and not add these to the result table. This means that these instructions are completely missing from the output. This commit removes the code that caused non-statement lines to be ignored. A result of this change is that GDB will now potentially include new line numbers in the 'disassemble /m' output, lines that previously were only in the line table as non-statement lines will now appear in the disassembly output. This feels like an improvement though. gdb/ChangeLog: * disasm.c (do_mixed_source_and_assembly_deprecated): Don't exclude non-statement entries. gdb/testsuite/ChangeLog: * gdb.dwarf2/dw2-disasm-over-non-stmt.exp: New file.
Diffstat (limited to 'gdb/disasm.c')
-rw-r--r--gdb/disasm.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/gdb/disasm.c b/gdb/disasm.c
index 143ba2f..e45c840 100644
--- a/gdb/disasm.c
+++ b/gdb/disasm.c
@@ -376,12 +376,6 @@ do_mixed_source_and_assembly_deprecated
if (le[i].line == le[i + 1].line && le[i].pc == le[i + 1].pc)
continue; /* Ignore duplicates. */
- /* Ignore non-statement line table entries. This means we print the
- source line at the place where GDB would insert a breakpoint for
- that line, which seems more intuitive. */
- if (le[i].is_stmt == 0)
- continue;
-
/* Skip any end-of-function markers. */
if (le[i].line == 0)
continue;