* [PATCH 1/2] dwarf_lang_to_enum_language: Map new DWARF5 constants
@ 2024-12-09 10:20 Alexandra Hájková
2024-12-09 10:20 ` [PATCH 2/2] mangle_style: Add " Alexandra Hájková
0 siblings, 1 reply; 4+ messages in thread
From: Alexandra Hájková @ 2024-12-09 10:20 UTC (permalink / raw)
To: gdb-patches; +Cc: ahajkova
Add new DWARF5 language codes to gdb/dwarf2/read.c where
they are converted to GDB language names. The codes
were added to include/dwarf.h by syncing with gcc, Ada language
codes were added to dwarf.h earlier.
---
gdb/dwarf2/read.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index 5a5e27f30a6..32194bcb3f2 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -17937,6 +17937,8 @@ dwarf_lang_to_enum_language (unsigned int lang)
case DW_LANG_C89:
case DW_LANG_C99:
case DW_LANG_C11:
+ case DW_LANG_C17:
+ case DW_LANG_C23:
case DW_LANG_C:
case DW_LANG_UPC:
language = language_c;
@@ -17945,6 +17947,8 @@ dwarf_lang_to_enum_language (unsigned int lang)
case DW_LANG_C_plus_plus:
case DW_LANG_C_plus_plus_11:
case DW_LANG_C_plus_plus_14:
+ case DW_LANG_C_plus_plus_20:
+ case DW_LANG_C_plus_plus_23:
language = language_cplus;
break;
case DW_LANG_D:
@@ -17955,16 +17959,21 @@ dwarf_lang_to_enum_language (unsigned int lang)
case DW_LANG_Fortran95:
case DW_LANG_Fortran03:
case DW_LANG_Fortran08:
+ case DW_LANG_Fortran18:
+ case DW_LANG_Fortran23:
language = language_fortran;
break;
case DW_LANG_Go:
language = language_go;
break;
+ case DW_LANG_Assembly:
case DW_LANG_Mips_Assembler:
language = language_asm;
break;
case DW_LANG_Ada83:
case DW_LANG_Ada95:
+ case DW_LANG_Ada2005:
+ case DW_LANG_Ada2012:
language = language_ada;
break;
case DW_LANG_Modula2:
--
2.47.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 2/2] mangle_style: Add new DWARF5 constants
2024-12-09 10:20 [PATCH 1/2] dwarf_lang_to_enum_language: Map new DWARF5 constants Alexandra Hájková
@ 2024-12-09 10:20 ` Alexandra Hájková
2024-12-09 10:51 ` Rohr, Stephan
0 siblings, 1 reply; 4+ messages in thread
From: Alexandra Hájková @ 2024-12-09 10:20 UTC (permalink / raw)
To: gdb-patches; +Cc: ahajkova
Update bfd/dwarf2.c with the new DWARF5 language codes to
make it possible to return the mangling style for the new
language codes for Ada 2005 and 20015, Fortran 18 and 23,
C++ 20 and 23, C 17 and 23 and Assembly.
---
bfd/dwarf2.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c
index 151ed0237ca..ec298764c8a 100644
--- a/bfd/dwarf2.c
+++ b/bfd/dwarf2.c
@@ -1725,12 +1725,16 @@ mangle_style (int lang)
{
case DW_LANG_Ada83:
case DW_LANG_Ada95:
+ case DW_LANG_Ada2005:
+ case DW_LANG_Ada2012:
return DMGL_GNAT;
case DW_LANG_C_plus_plus:
case DW_LANG_C_plus_plus_03:
case DW_LANG_C_plus_plus_11:
case DW_LANG_C_plus_plus_14:
+ case DW_LANG_C_plus_plus_20:
+ case DW_LANG_C_plus_plus_23:
return DMGL_GNU_V3;
case DW_LANG_Java:
@@ -1751,12 +1755,17 @@ mangle_style (int lang)
case DW_LANG_Cobol74:
case DW_LANG_Cobol85:
case DW_LANG_Fortran77:
+ case DW_LANG_Fortran18:
+ case DW_LANG_Fortran23:
case DW_LANG_Pascal83:
case DW_LANG_PLI:
case DW_LANG_C99:
case DW_LANG_UPC:
case DW_LANG_C11:
+ case DW_LANG_C17:
+ case DW_LANG_C23:
case DW_LANG_Mips_Assembler:
+ case DW_LANG_Assembly:
case DW_LANG_Upc:
case DW_LANG_HP_Basic91:
case DW_LANG_HP_IMacro:
--
2.47.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH 2/2] mangle_style: Add new DWARF5 constants
2024-12-09 10:20 ` [PATCH 2/2] mangle_style: Add " Alexandra Hájková
@ 2024-12-09 10:51 ` Rohr, Stephan
2024-12-09 15:37 ` Alexandra Petlanova Hajkova
0 siblings, 1 reply; 4+ messages in thread
From: Rohr, Stephan @ 2024-12-09 10:51 UTC (permalink / raw)
To: Alexandra Hájková, gdb-patches
Hi Alexandra,
just a small nit.
Stephan
> -----Original Message-----
> From: Alexandra Hájková <ahajkova@redhat.com>
> Sent: Monday, 9 December 2024 11:21
> To: gdb-patches@sourceware.org
> Cc: ahajkova@redhat.com
> Subject: [PATCH 2/2] mangle_style: Add new DWARF5 constants
>
> Update bfd/dwarf2.c with the new DWARF5 language codes to
> make it possible to return the mangling style for the new
> language codes for Ada 2005 and 20015, Fortran 18 and 23,
> C++ 20 and 23, C 17 and 23 and Assembly.
> ---
> bfd/dwarf2.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c
> index 151ed0237ca..ec298764c8a 100644
> --- a/bfd/dwarf2.c
> +++ b/bfd/dwarf2.c
> @@ -1725,12 +1725,16 @@ mangle_style (int lang)
> {
> case DW_LANG_Ada83:
> case DW_LANG_Ada95:
> + case DW_LANG_Ada2005:
> + case DW_LANG_Ada2012:
> return DMGL_GNAT;
>
> case DW_LANG_C_plus_plus:
> case DW_LANG_C_plus_plus_03:
> case DW_LANG_C_plus_plus_11:
> case DW_LANG_C_plus_plus_14:
> + case DW_LANG_C_plus_plus_20:
> + case DW_LANG_C_plus_plus_23:
> return DMGL_GNU_V3;
>
Should we add `DW_LANG_C_plus_plus_17`, too?
> case DW_LANG_Java:
> @@ -1751,12 +1755,17 @@ mangle_style (int lang)
> case DW_LANG_Cobol74:
> case DW_LANG_Cobol85:
> case DW_LANG_Fortran77:
> + case DW_LANG_Fortran18:
> + case DW_LANG_Fortran23:
> case DW_LANG_Pascal83:
> case DW_LANG_PLI:
> case DW_LANG_C99:
> case DW_LANG_UPC:
> case DW_LANG_C11:
> + case DW_LANG_C17:
> + case DW_LANG_C23:
> case DW_LANG_Mips_Assembler:
> + case DW_LANG_Assembly:
> case DW_LANG_Upc:
> case DW_LANG_HP_Basic91:
> case DW_LANG_HP_IMacro:
> --
> 2.47.0
Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Sean Fennelly, Jeffrey Schneiderman, Tiffany Doon Silva
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] mangle_style: Add new DWARF5 constants
2024-12-09 10:51 ` Rohr, Stephan
@ 2024-12-09 15:37 ` Alexandra Petlanova Hajkova
0 siblings, 0 replies; 4+ messages in thread
From: Alexandra Petlanova Hajkova @ 2024-12-09 15:37 UTC (permalink / raw)
To: Rohr, Stephan; +Cc: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 1471 bytes --]
On Mon, Dec 9, 2024 at 11:51 AM Rohr, Stephan <stephan.rohr@intel.com>
wrote:
> Hi Alexandra,
>
> just a small nit.
>
> Stephan
>
> > -----Original Message-----
> > From: Alexandra Hájková <ahajkova@redhat.com>
> > Sent: Monday, 9 December 2024 11:21
> > To: gdb-patches@sourceware.org
> > Cc: ahajkova@redhat.com
> > Subject: [PATCH 2/2] mangle_style: Add new DWARF5 constants
> >
> > Update bfd/dwarf2.c with the new DWARF5 language codes to
> > make it possible to return the mangling style for the new
> > language codes for Ada 2005 and 20015, Fortran 18 and 23,
> > C++ 20 and 23, C 17 and 23 and Assembly.
> > ---
> > bfd/dwarf2.c | 9 +++++++++
> > 1 file changed, 9 insertions(+)
> >
> > diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c
> > index 151ed0237ca..ec298764c8a 100644
> > --- a/bfd/dwarf2.c
> > +++ b/bfd/dwarf2.c
> > @@ -1725,12 +1725,16 @@ mangle_style (int lang)
> > {
> > case DW_LANG_Ada83:
> > case DW_LANG_Ada95:
> > + case DW_LANG_Ada2005:
> > + case DW_LANG_Ada2012:
> > return DMGL_GNAT;
> >
> > case DW_LANG_C_plus_plus:
> > case DW_LANG_C_plus_plus_03:
> > case DW_LANG_C_plus_plus_11:
> > case DW_LANG_C_plus_plus_14:
> > + case DW_LANG_C_plus_plus_20:
> > + case DW_LANG_C_plus_plus_23:
> > return DMGL_GNU_V3;
> >
>
> Should we add `DW_LANG_C_plus_plus_17`, too?
>
> You re absolutely right, I forgot to add it.
>
Thank you!
[-- Attachment #2: Type: text/html, Size: 2257 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-12-09 15:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-09 10:20 [PATCH 1/2] dwarf_lang_to_enum_language: Map new DWARF5 constants Alexandra Hájková
2024-12-09 10:20 ` [PATCH 2/2] mangle_style: Add " Alexandra Hájková
2024-12-09 10:51 ` Rohr, Stephan
2024-12-09 15:37 ` Alexandra Petlanova Hajkova
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox