Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>
To: <gdb-patches@sourceware.org>
Subject: [RFA]dwarf reader:  Avoid complaint on const type
Date: Fri, 21 May 2010 15:31:00 -0000	[thread overview]
Message-ID: <000a01caf8f8$6705ed60$3511c820$@muller@ics-cnrs.unistra.fr> (raw)

  GDB CVS compiled for Linux arm gave several dwarf complaints 
when debugging itself that I tried to fix.

  Here is a first fix:
It seem that some symbol directly come as
DW_TAG_const_type, I believe it was due to
typedef const struct reloc_howto_struct reloc_howto_type;
from bfd-in.h (or bfd-in2.h), but I did not recheck this
carefully.

  The patch below fixes that complaint.

  Tested on compiler farm machine gcc16, no regression found.

  Is this correct?
Maybe there are other position where DW_TAG_const_type
and DW_TAG_volatile_type should be added...

Pierre Muller
Pascal language support maintainer for GDB


2010-05-21  Pierre Muller  <muller@ics.u-strasbg.fr>

	* dwarf2read.c (process_die): Also allow DW_TAG_const_type
	and DW_TAG_volatile_type.
	(new_symbol): Likewise.

Index: src/gdb/dwarf2read.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2read.c,v
retrieving revision 1.386
diff -u -p -r1.386 dwarf2read.c
--- src/gdb/dwarf2read.c	17 May 2010 15:55:01 -0000	1.386
+++ src/gdb/dwarf2read.c	21 May 2010 14:40:59 -0000
@@ -3194,6 +3194,8 @@ process_die (struct die_info *die, struc
     case DW_TAG_base_type:
     case DW_TAG_subrange_type:
     case DW_TAG_typedef:
+    case DW_TAG_const_type:
+    case DW_TAG_volatile_type:
       /* Add a typedef symbol for the type definition, if it has a
          DW_AT_name.  */
       new_symbol (die, read_type_die (die, cu), cu);
@@ -8742,6 +8744,8 @@ new_symbol (struct die_info *die, struct
 	  break;
 	case DW_TAG_base_type:
         case DW_TAG_subrange_type:
+        case DW_TAG_const_type:
+        case DW_TAG_volatile_type:
 	  SYMBOL_CLASS (sym) = LOC_TYPEDEF;
 	  SYMBOL_DOMAIN (sym) = VAR_DOMAIN;
 	  add_symbol_to_list (sym, cu->list_in_scope);


             reply	other threads:[~2010-05-21 15:15 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-21 15:31 Pierre Muller [this message]
     [not found] <41597.7287375883$1274454923@news.gmane.org>
2010-05-21 17:20 ` Tom Tromey
2010-05-21 20:46   ` Pierre Muller
2010-06-16 16:08     ` Pedro Alves
2010-06-20 22:39       ` Pierre Muller
     [not found]       ` <3752333521215815628@unknownmsgid>
2010-06-28 20:27         ` Doug Evans
2010-06-29 13:09           ` Pierre Muller
2010-07-01 17:09             ` Pedro Alves
2010-07-01 17:13               ` Joel Brobecker
2010-07-21 17:16                 ` Pedro Alves
     [not found]           ` <29342.6726283089$1277816998@news.gmane.org>
2010-07-02 21:47             ` 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='000a01caf8f8$6705ed60$3511c820$@muller@ics-cnrs.unistra.fr' \
    --to=pierre.muller@ics-cnrs.unistra.fr \
    --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