aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/lib
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2020-11-03 17:41:11 +0100
committerTom de Vries <tdevries@suse.de>2020-11-03 17:41:11 +0100
commitc40907bfe00b5a3dc574ea0270cc2ffa9c5a4dc2 (patch)
tree9294cbf5e3e7b86cb7fe0516bbb8704a030ccc1a /gdb/testsuite/lib
parentf3016d6ce178b76002edde12c30ebe7f608a8e21 (diff)
downloadgdb-c40907bfe00b5a3dc574ea0270cc2ffa9c5a4dc2.zip
gdb-c40907bfe00b5a3dc574ea0270cc2ffa9c5a4dc2.tar.gz
gdb-c40907bfe00b5a3dc574ea0270cc2ffa9c5a4dc2.tar.bz2
[gdb/testsuite] Fix .debug_abbrev terminators
The abbreviations table for a single compilation unit has two types of terminators: - a ".byte 0" pair denoting the end of an attribute list - a single ".byte 0" denoting the end of the table However, at the end of the .debug_abbrev section in dw2-line-number-zero-dw.S, we have four ".byte 0" entries: ... .uleb128 0x12 /* DW_AT_high_pc */ .uleb128 0x01 /* DW_FORM_addr */ .byte 0x0 /* Terminator */ .byte 0x0 /* Terminator */ .byte 0x0 /* Terminator */ .byte 0x0 /* Terminator */ ... The first two are the attribute list terminator, the third is the end-of-table terminator, and the last is superfluous/incorrect. Fix this by emitting instead: ... .uleb128 0x12 /* DW_AT_high_pc */ .uleb128 0x01 /* DW_FORM_addr */ .byte 0x0 /* DW_AT - Terminator */ .byte 0x0 /* DW_FORM - Terminator */ .byte 0x0 /* Abbrev end - Terminator */ ... where the last comment resembles the comment for other abbreviation codes: ... .section .debug_abbrev .Labbrev1_begin: .uleb128 2 /* Abbrev start */ ... Tested on x86_64-linux. gdb/testsuite/ChangeLog: 2020-11-03 Tom de Vries <tdevries@suse.de> * lib/dwarf.exp (Dwarf::_handle_DW_TAG): Improve attribute list terminator comments. (Dwarf::cu, Dwarf::tu): Remove superfluous abbreviation table terminator.
Diffstat (limited to 'gdb/testsuite/lib')
-rw-r--r--gdb/testsuite/lib/dwarf.exp10
1 files changed, 4 insertions, 6 deletions
diff --git a/gdb/testsuite/lib/dwarf.exp b/gdb/testsuite/lib/dwarf.exp
index 1a0cbf6..c585621 100644
--- a/gdb/testsuite/lib/dwarf.exp
+++ b/gdb/testsuite/lib/dwarf.exp
@@ -723,8 +723,8 @@ namespace eval Dwarf {
_defer_output $_abbrev_section {
# Terminator.
- _op .byte 0x0 Terminator
- _op .byte 0x0 Terminator
+ _op .byte 0x0 "DW_AT - Terminator"
+ _op .byte 0x0 "DW_FORM - Terminator"
}
if {$has_children} {
@@ -1111,8 +1111,7 @@ namespace eval Dwarf {
_defer_output $_abbrev_section {
# Emit the terminator.
- _op .byte 0x0 Terminator
- _op .byte 0x0 Terminator
+ _op .byte 0x0 "Abbrev end - Terminator"
}
define_label $end_label
@@ -1220,8 +1219,7 @@ namespace eval Dwarf {
_defer_output $_abbrev_section {
# Emit the terminator.
- _op .byte 0x0 Terminator
- _op .byte 0x0 Terminator
+ _op .byte 0x0 "Abbrev end - Terminator"
}
define_label $end_label