From: Tom Tromey <tromey@redhat.com>
To: Tristan Gingold <gingold@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: FYI: implement new DWARF macro proposal
Date: Wed, 27 Jul 2011 15:30:00 -0000 [thread overview]
Message-ID: <m3oc0fain7.fsf@fleche.redhat.com> (raw)
In-Reply-To: <63F9CC20-59B3-4D4A-AE35-069BBCD94909@adacore.com> (Tristan Gingold's message of "Wed, 27 Jul 2011 10:08:32 +0200")
Tristan> Looks like you forgot to update the table for AIX.
Thanks.
I am checking in the appended. It adds this entry, and it also changes
dwarf2_debug_sections to make it less likely that future changes will
have the same problem. Now if you forget to add a name to an instance
of the struct, you will see an error from the compiler.
Tom
2011-07-27 Tom Tromey <tromey@redhat.com>
* xcoffread.c (dwarf2_xcoff_names): Add 'macro' and 'sentinel'
entries.
* symfile.h (struct dwarf2_debug_sections) <sentinel>: New field.
* dwarf2read.c (dwarf2_elf_names): Add sentinel entry.
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 505f576..c009aac 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -271,7 +271,8 @@ static const struct dwarf2_debug_sections dwarf2_elf_names = {
{ ".debug_types", ".zdebug_types" },
{ ".debug_frame", ".zdebug_frame" },
{ ".eh_frame", NULL },
- { ".gdb_index", ".zgdb_index" }
+ { ".gdb_index", ".zgdb_index" },
+ 23
};
/* local data types */
diff --git a/gdb/symfile.h b/gdb/symfile.h
index eb5beaa..0e648d0 100644
--- a/gdb/symfile.h
+++ b/gdb/symfile.h
@@ -589,6 +589,9 @@ struct dwarf2_debug_sections {
struct dwarf2_section_names frame;
struct dwarf2_section_names eh_frame;
struct dwarf2_section_names gdb_index;
+ /* This field has no meaning, but exists solely to catch changes to
+ this structure which are not reflected in some instance. */
+ int sentinel;
};
extern int dwarf2_has_info (struct objfile *,
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c
index 0c4cbd1..d7760ee 100644
--- a/gdb/xcoffread.c
+++ b/gdb/xcoffread.c
@@ -160,12 +160,14 @@ static const struct dwarf2_debug_sections dwarf2_xcoff_names = {
{ ".dwline", NULL },
{ ".dwloc", NULL },
{ NULL, NULL }, /* debug_macinfo */
+ { NULL, NULL }, /* debug_macro */
{ ".dwstr", NULL },
{ ".dwrnges", NULL },
{ NULL, NULL }, /* debug_types */
{ ".dwframe", NULL },
{ NULL, NULL }, /* eh_frame */
- { NULL, NULL } /* gdb_index */
+ { NULL, NULL }, /* gdb_index */
+ 23
};
static void
next prev parent reply other threads:[~2011-07-27 14:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-26 18:31 Tom Tromey
2011-07-27 10:12 ` Tristan Gingold
2011-07-27 15:30 ` Tom Tromey [this message]
2011-07-27 15:31 ` Tristan Gingold
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=m3oc0fain7.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=gingold@adacore.com \
/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