From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29661 invoked by alias); 27 Jul 2011 14:44:15 -0000 Received: (qmail 29651 invoked by uid 22791); 27 Jul 2011 14:44:13 -0000 X-SWARE-Spam-Status: No, hits=-7.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS,TW_BJ X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 27 Jul 2011 14:43:56 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p6REhhJO023465 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 27 Jul 2011 10:43:43 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p6REhguf032068; Wed, 27 Jul 2011 10:43:42 -0400 Received: from barimba (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id p6REhf5Z014643; Wed, 27 Jul 2011 10:43:41 -0400 From: Tom Tromey To: Tristan Gingold Cc: gdb-patches@sourceware.org Subject: Re: FYI: implement new DWARF macro proposal References: <63F9CC20-59B3-4D4A-AE35-069BBCD94909@adacore.com> Date: Wed, 27 Jul 2011 15:30:00 -0000 In-Reply-To: <63F9CC20-59B3-4D4A-AE35-069BBCD94909@adacore.com> (Tristan Gingold's message of "Wed, 27 Jul 2011 10:08:32 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-07/txt/msg00761.txt.bz2 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 * xcoffread.c (dwarf2_xcoff_names): Add 'macro' and 'sentinel' entries. * symfile.h (struct dwarf2_debug_sections) : 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