public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Recognize new DWARFv5 C11, C++11 and C++14 DW_LANG constants.
@ 2014-11-24 19:58 Mark Wielaard
  2014-11-24 20:07 ` Doug Evans
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Wielaard @ 2014-11-24 19:58 UTC (permalink / raw)
  To: gdb-patches; +Cc: Mark Wielaard

The following patch is needed to recognize the new DW_LANG constants
that GCC 5 might emit as implemented by this GCC patch:
https://gcc.gnu.org/ml/gcc-patches/2014-11/msg02852.html

gdb/ChangeLog

	* dwarf2read.c (set_cu_language): Recognize DW_LANG_C11,
	DW_LANG_C_plus_plus_11, DW_LANG_C_plus_plus_14.

include/ChangeLog

	* dwarf2.h: Add DW_LANG_C_plus_plus_11, DW_LANG_C11 and
	DW_LANG_C_plus_plus_14.

OK to commit?

Thanks,

Mark

diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 0790388..36cbbd9 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -16711,11 +16711,14 @@ set_cu_language (unsigned int lang, struct dwarf2_cu *cu)
     {
     case DW_LANG_C89:
     case DW_LANG_C99:
+    case DW_LANG_C11:
     case DW_LANG_C:
     case DW_LANG_UPC:
       cu->language = language_c;
       break;
     case DW_LANG_C_plus_plus:
+    case DW_LANG_C_plus_plus_11:
+    case DW_LANG_C_plus_plus_14:
       cu->language = language_cplus;
       break;
     case DW_LANG_D:
diff --git a/include/dwarf2.h b/include/dwarf2.h
index 120e2c1..ca440dd 100644
--- a/include/dwarf2.h
+++ b/include/dwarf2.h
@@ -309,6 +309,10 @@ enum dwarf_source_language
     /* DWARF 5.  */
     DW_LANG_Go = 0x0016,
 
+    DW_LANG_C_plus_plus_11 = 0x001a, /* dwarf5.20141029.pdf DRAFT */
+    DW_LANG_C11 = 0x001d,
+    DW_LANG_C_plus_plus_14 = 0x0021,
+
     DW_LANG_lo_user = 0x8000,	/* Implementation-defined range start.  */
     DW_LANG_hi_user = 0xffff,	/* Implementation-defined range start.  */
 
-- 
1.8.3.1

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

* Re: [PATCH] Recognize new DWARFv5 C11, C++11 and C++14 DW_LANG constants.
  2014-11-24 19:58 [PATCH] Recognize new DWARFv5 C11, C++11 and C++14 DW_LANG constants Mark Wielaard
@ 2014-11-24 20:07 ` Doug Evans
  2014-11-26 11:48   ` Mark Wielaard
  0 siblings, 1 reply; 3+ messages in thread
From: Doug Evans @ 2014-11-24 20:07 UTC (permalink / raw)
  To: Mark Wielaard; +Cc: gdb-patches

On Mon, Nov 24, 2014 at 11:58 AM, Mark Wielaard <mjw@redhat.com> wrote:
> The following patch is needed to recognize the new DW_LANG constants
> that GCC 5 might emit as implemented by this GCC patch:
> https://gcc.gnu.org/ml/gcc-patches/2014-11/msg02852.html
>
> gdb/ChangeLog
>
>         * dwarf2read.c (set_cu_language): Recognize DW_LANG_C11,
>         DW_LANG_C_plus_plus_11, DW_LANG_C_plus_plus_14.
>
> include/ChangeLog
>
>         * dwarf2.h: Add DW_LANG_C_plus_plus_11, DW_LANG_C11 and
>         DW_LANG_C_plus_plus_14.
>
> OK to commit?

dwarf2.h exists in the gcc tree and is therefore owned by gcc.
As long as this part of the patch is in the gcc tree first,
ok by me.

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

* Re: [PATCH] Recognize new DWARFv5 C11, C++11 and C++14 DW_LANG constants.
  2014-11-24 20:07 ` Doug Evans
@ 2014-11-26 11:48   ` Mark Wielaard
  0 siblings, 0 replies; 3+ messages in thread
From: Mark Wielaard @ 2014-11-26 11:48 UTC (permalink / raw)
  To: Doug Evans; +Cc: gdb-patches

On Mon, 2014-11-24 at 12:07 -0800, Doug Evans wrote:
> On Mon, Nov 24, 2014 at 11:58 AM, Mark Wielaard <mjw@redhat.com> wrote:
> > The following patch is needed to recognize the new DW_LANG constants
> > that GCC 5 might emit as implemented by this GCC patch:
> > https://gcc.gnu.org/ml/gcc-patches/2014-11/msg02852.html
> >
> > gdb/ChangeLog
> >
> >         * dwarf2read.c (set_cu_language): Recognize DW_LANG_C11,
> >         DW_LANG_C_plus_plus_11, DW_LANG_C_plus_plus_14.
> >
> > include/ChangeLog
> >
> >         * dwarf2.h: Add DW_LANG_C_plus_plus_11, DW_LANG_C11 and
> >         DW_LANG_C_plus_plus_14.
> >
> > OK to commit?
> 
> dwarf2.h exists in the gcc tree and is therefore owned by gcc.
> As long as this part of the patch is in the gcc tree first,
> ok by me.

The dwarf2.h change is also in the gcc tree.
I have pushed the same with the above patch to the gdb tree.

Thanks,

Mark

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

end of thread, other threads:[~2014-11-26 11:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-24 19:58 [PATCH] Recognize new DWARFv5 C11, C++11 and C++14 DW_LANG constants Mark Wielaard
2014-11-24 20:07 ` Doug Evans
2014-11-26 11:48   ` Mark Wielaard

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