public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Add some new DW_IDX_* constants
@ 2023-12-09 20:56 Tom Tromey
  2023-12-09 22:03 ` Jakub Jelinek
  0 siblings, 1 reply; 3+ messages in thread
From: Tom Tromey @ 2023-12-09 20:56 UTC (permalink / raw)
  To: gcc-patches; +Cc: gdb-patches, Tom Tromey

I've reimplemented the .debug_names code in GDB -- it was quite far
from being correct, and the new implementation is much closer to what
is specified by DWARF.

However, the new writer in GDB needs to emit some symbol properties,
so that the reader can be fully functional.  This patch adds a few new
DW_IDX_* constants, and tries to document the existing extensions as
well.  (My patch series add more documentation of these to the GDB
manual as well.)
---
 include/dwarf2.def | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/include/dwarf2.def b/include/dwarf2.def
index 7ab3ee611fd4..75b75d901884 100644
--- a/include/dwarf2.def
+++ b/include/dwarf2.def
@@ -802,8 +802,17 @@ DW_IDX (DW_IDX_parent, 4)
 DW_IDX (DW_IDX_type_hash, 5)
 DW_IDX_DUP (DW_IDX_lo_user, 0x2000)
 DW_IDX (DW_IDX_hi_user, 0x3fff)
+/* Internal linkage.  A flag.  */
 DW_IDX (DW_IDX_GNU_internal, 0x2000)
+/* External linkage.  A flag.  Note that gdb no longer generates this;
+   the default is to assume external linkage.  */
 DW_IDX (DW_IDX_GNU_external, 0x2001)
+/* This entry is the program's entry point.  A flag.  */
+DW_IDX (DW_IDX_GNU_main, 0x2002)
+/* Language for this entry.  A DW_LANG_* value.  */
+DW_IDX (DW_IDX_GNU_language, 0x2003)
+/* This entry is a linkage name.  A flag.  */
+DW_IDX (DW_IDX_GNU_linkage_name, 0x2004)
 DW_END_IDX
 
 /* DWARF5 Unit type header encodings  */
-- 
2.43.0


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

* Re: [PATCH] Add some new DW_IDX_* constants
  2023-12-09 20:56 [PATCH] Add some new DW_IDX_* constants Tom Tromey
@ 2023-12-09 22:03 ` Jakub Jelinek
  2023-12-10 20:59   ` Tom Tromey
  0 siblings, 1 reply; 3+ messages in thread
From: Jakub Jelinek @ 2023-12-09 22:03 UTC (permalink / raw)
  To: Tom Tromey; +Cc: gcc-patches, gdb-patches

On Sat, Dec 09, 2023 at 01:56:53PM -0700, Tom Tromey wrote:
> I've reimplemented the .debug_names code in GDB -- it was quite far
> from being correct, and the new implementation is much closer to what
> is specified by DWARF.
> 
> However, the new writer in GDB needs to emit some symbol properties,
> so that the reader can be fully functional.  This patch adds a few new
> DW_IDX_* constants, and tries to document the existing extensions as
> well.  (My patch series add more documentation of these to the GDB
> manual as well.)

LGTM for GCC (but it needs a ChangeLog entry).

> diff --git a/include/dwarf2.def b/include/dwarf2.def
> index 7ab3ee611fd4..75b75d901884 100644
> --- a/include/dwarf2.def
> +++ b/include/dwarf2.def
> @@ -802,8 +802,17 @@ DW_IDX (DW_IDX_parent, 4)
>  DW_IDX (DW_IDX_type_hash, 5)
>  DW_IDX_DUP (DW_IDX_lo_user, 0x2000)
>  DW_IDX (DW_IDX_hi_user, 0x3fff)
> +/* Internal linkage.  A flag.  */
>  DW_IDX (DW_IDX_GNU_internal, 0x2000)
> +/* External linkage.  A flag.  Note that gdb no longer generates this;
> +   the default is to assume external linkage.  */
>  DW_IDX (DW_IDX_GNU_external, 0x2001)
> +/* This entry is the program's entry point.  A flag.  */
> +DW_IDX (DW_IDX_GNU_main, 0x2002)
> +/* Language for this entry.  A DW_LANG_* value.  */
> +DW_IDX (DW_IDX_GNU_language, 0x2003)
> +/* This entry is a linkage name.  A flag.  */
> +DW_IDX (DW_IDX_GNU_linkage_name, 0x2004)
>  DW_END_IDX
>  
>  /* DWARF5 Unit type header encodings  */
> -- 
> 2.43.0

	Jakub


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

* Re: [PATCH] Add some new DW_IDX_* constants
  2023-12-09 22:03 ` Jakub Jelinek
@ 2023-12-10 20:59   ` Tom Tromey
  0 siblings, 0 replies; 3+ messages in thread
From: Tom Tromey @ 2023-12-10 20:59 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Tom Tromey, gcc-patches, gdb-patches

>>>>> "Jakub" == Jakub Jelinek <jakub@redhat.com> writes:

Jakub> LGTM for GCC (but it needs a ChangeLog entry).

Oops, yeah -- I am out of the habit of writing those.
I'll add one before I push this.

Tom

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

end of thread, other threads:[~2023-12-10 20:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-09 20:56 [PATCH] Add some new DW_IDX_* constants Tom Tromey
2023-12-09 22:03 ` Jakub Jelinek
2023-12-10 20:59   ` Tom Tromey

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).