public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Start abbrevs at 1 in DWARF assembler
@ 2023-12-05 21:23 Tom Tromey
  2023-12-06 14:38 ` Tom de Vries
  0 siblings, 1 reply; 4+ messages in thread
From: Tom Tromey @ 2023-12-05 21:23 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

I noticed that the DWARF assembler starts abbrevs at 2.
I think 1 should be preferred.
---
 gdb/testsuite/lib/dwarf.exp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/gdb/testsuite/lib/dwarf.exp b/gdb/testsuite/lib/dwarf.exp
index f09da0430ab..19c89c048fe 100644
--- a/gdb/testsuite/lib/dwarf.exp
+++ b/gdb/testsuite/lib/dwarf.exp
@@ -564,8 +564,8 @@ namespace eval Dwarf {
     # for Fission.
     variable _abbrev_section
 
-    # The next available abbrev number in the current CU's abbrev
-    # table.
+    # The most recently assigned abbrev number in the current CU's
+    # abbrev table.
     variable _abbrev_num
 
     # The string table for this assembly.  The key is the string; the
@@ -1485,7 +1485,7 @@ namespace eval Dwarf {
 
 	set cu_num [incr _cu_count]
 	set my_abbrevs [_compute_label "abbrev${cu_num}_begin"]
-	set _abbrev_num 1
+	set _abbrev_num 0
 
 	set _cu_label [_compute_label "cu${cu_num}_begin"]
 	set start_label [_compute_label "cu${cu_num}_start"]
@@ -1597,7 +1597,7 @@ namespace eval Dwarf {
 
 	set cu_num [incr _cu_count]
 	set my_abbrevs [_compute_label "abbrev${cu_num}_begin"]
-	set _abbrev_num 1
+	set _abbrev_num 0
 
 	set _cu_label [_compute_label "cu${cu_num}_begin"]
 	set start_label [_compute_label "cu${cu_num}_start"]
-- 
2.43.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-12-06 16:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-05 21:23 [PATCH] Start abbrevs at 1 in DWARF assembler Tom Tromey
2023-12-06 14:38 ` Tom de Vries
2023-12-06 15:41   ` Tom Tromey
2023-12-06 16:27     ` Tom de Vries

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).