From: Tom Tromey <tom@tromey.com>
To: gdb-patches@sourceware.org
Subject: [PATCH 05/17] Document GDB extensions to DWARF .debug_names
Date: Sun, 10 Dec 2023 09:44:54 -0700 [thread overview]
Message-ID: <20231210-debug-names-fix-v1-5-a8f6d2525018@tromey.com> (raw)
In-Reply-To: <20231210-debug-names-fix-v1-0-a8f6d2525018@tromey.com>
GDB's new .debug_names implementation uses some extensions. This
patch adds some documentation on this to the manual.
---
gdb/doc/gdb.texinfo | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 139484460c8..755f48ed1de 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -21477,6 +21477,7 @@ program. To debug a core dump of a previous run, you must also tell
* Separate Debug Files:: Debugging information in separate files
* MiniDebugInfo:: Debugging information in a special section
* Index Files:: Index files speed up GDB
+* Debug Names:: Extensions to .debug_names
* Symbol Errors:: Errors reading symbol files
* Data Files:: GDB data files
@end menu
@@ -22680,6 +22681,44 @@ Print the number of cache hits and misses since the launch of @value{GDBN}.
@end table
+@node Debug Names
+@section Extensions to @samp{.debug_names}
+@cindex index files
+@cindex @samp{.debug_names} section
+
+The DWARF specification documents an optional index section called
+@samp{.debug_names}. @value{GDBN} can both read and create this
+section. However, in order to work with @value{GDBN}, some extensions
+were necessary.
+
+@value{GDBN} uses the augmentation string @samp{GDB2}. Earlier
+versions used the string @samp{GDB}, but these versions of the index
+are no longer supported.
+
+@value{GDBN} does not use the specified hash table. Therefore,
+because this hash table is optional, @value{GDBN} also does not write
+it.
+
+@value{GDBN} also generates and uses some extra index attributes:
+@table @code
+@item DW_IDX_GNU_internal
+This has the value @samp{0x2000}. It is a flag that, when set,
+indicates that the associated entry has @code{static} linkage.
+
+@item DW_IDX_GNU_main
+This has the value @samp{0x2002}. It is a flag that, when set,
+indicates that the associated entry is the program's @code{main}.
+
+@item DW_IDX_GNU_language
+This has the value @samp{0x2003}. It is @samp{DW_LANG_} constant,
+indicating the language of the associated entry.
+
+@item DW_IDX_GNU_linkage_name
+This has the value @samp{0x2004}. It is a flag that, when set,
+indicates that the associated entry is a linkage name, and not a
+source name.
+@end table
+
@node Symbol Errors
@section Errors Reading Symbol Files
--
2.43.0
next prev parent reply other threads:[~2023-12-10 16:45 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-10 16:44 [PATCH 00/17] Rewrite .debug_names reader and writer Tom Tromey
2023-12-10 16:44 ` [PATCH 01/17] Refactor 'maint set dwarf synchronous' handling Tom Tromey
2023-12-10 16:44 ` [PATCH 02/17] Refactor quick-function installation in DWARF reader Tom Tromey
2023-12-10 16:44 ` [PATCH 03/17] Remove IS_ENUM_CLASS from cooked_index_flag Tom Tromey
2023-12-10 16:44 ` [PATCH 04/17] Add some new DW_IDX_* values Tom Tromey
2024-01-09 15:08 ` Tom Tromey
2024-01-09 19:02 ` Tom Tromey
2023-12-10 16:44 ` Tom Tromey [this message]
2023-12-10 17:37 ` [PATCH 05/17] Document GDB extensions to DWARF .debug_names Eli Zaretskii
2024-01-17 16:24 ` Tom Tromey
2023-12-10 16:44 ` [PATCH 06/17] Add language to cooked_index_entry Tom Tromey
2023-12-10 16:44 ` [PATCH 07/17] Move cooked_index_functions to cooked-index.h Tom Tromey
2023-12-10 16:44 ` [PATCH 08/17] Do not write the index cache from an index Tom Tromey
2023-12-10 16:44 ` [PATCH 09/17] Change cooked_index_worker to abstract base class Tom Tromey
2023-12-10 16:44 ` [PATCH 10/17] Remove cooked_index_worker::start_reading Tom Tromey
2023-12-10 16:45 ` [PATCH 11/17] Empty hash table fix in .debug_names reader Tom Tromey
2023-12-10 16:45 ` [PATCH 12/17] Fix dw2-zero-range.exp when an index is in use Tom Tromey
2023-12-10 16:45 ` [PATCH 13/17] Explicitly expand CUs in dw2-inline-with-lexical-scope.exp Tom Tromey
2023-12-10 16:45 ` [PATCH 14/17] Remove some .debug_names tests Tom Tromey
2023-12-10 16:45 ` [PATCH 15/17] Rewrite .debug_names reader Tom Tromey
2023-12-10 16:45 ` [PATCH 16/17] Export dwarf5_augmentation Tom Tromey
2023-12-10 16:45 ` [PATCH 17/17] Rewrite .debug_names writer Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231210-debug-names-fix-v1-5-a8f6d2525018@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).