From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29058 invoked by alias); 7 May 2013 10:10:06 -0000 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 Received: (qmail 29040 invoked by uid 89); 7 May 2013 10:10:05 -0000 X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_HOSTKARMA_NO autolearn=ham version=3.3.1 Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Tue, 07 May 2013 10:10:04 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 2E27E2EDA2; Tue, 7 May 2013 06:10:03 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 3L+EgTht-mHG; Tue, 7 May 2013 06:10:03 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 9A1432EBC7; Tue, 7 May 2013 06:10:02 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 92D6DC2AFA; Tue, 7 May 2013 14:09:56 +0400 (RET) Date: Tue, 07 May 2013 10:10:00 -0000 From: Joel Brobecker To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [commit] reimplement AIX shared-lib support (v3) Message-ID: <20130507100956.GK5278@adacore.com> References: <1367850045-26717-1-git-send-email-brobecker@adacore.com> <5187C8A5.50200@redhat.com> <20130507084225.GJ5278@adacore.com> <5188C19C.5090002@redhat.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="tEFtbjk+mNEviIIX" Content-Disposition: inline In-Reply-To: <5188C19C.5090002@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Found: No X-SW-Source: 2013-05/txt/msg00189.txt.bz2 --tEFtbjk+mNEviIIX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 1113 > > Yes, you are right. Upon trying to document it, and looking at > > how the other XML formats are described in the manual, I realized > > that maybe it would be better if the XML used library-list-aix > > instead of just library-list. It would be more consistent, I think, > > with what is done for instance with SVR4, but also avoid any > > confusion with the library-list. WDYT? > > I agree. Thanks! Attached are the two patches I will commit momentarily. The first one implements the suggestion you sent on IRC. The second is about renaming the name of the XML element. gdb/ChangeLog: * target.h (enum target_object) [TARGET_OBJECT_LIBRARIES_AIX]: Renames TARGET_OBJECT_AIX_LIBRARIES. * rs6000-nat.c: Replace TARGET_OBJECT_AIX_LIBRARIES with TARGET_OBJECT_LIBRARIES_AIX throughout. * solib-aix.c: Likwise. gdb/ChangeLog: * features/library-list-aix.dtd: Replace library-list by library-list-aix. * rs6000-nat.c: Replace library-list by library-list-aix throughout. * solib-aix.c: Likewise. Tested on ppc-aix. -- Joel --tEFtbjk+mNEviIIX Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0001-Rename-TARGET_OBJECT_AIX_LIBRARIES-to-TARGET_OBJECT_.patch" Content-length: 3434 >From f2dca001de528ac413c864e8dd9b74f999ace043 Mon Sep 17 00:00:00 2001 From: Joel Brobecker Date: Tue, 7 May 2013 05:10:51 -0400 Subject: [PATCH 1/2] Rename TARGET_OBJECT_AIX_LIBRARIES to TARGET_OBJECT_LIBRARIES_AIX More consistent with the name of other similar object names. gdb/ChangeLog: * target.h (enum target_object) [TARGET_OBJECT_LIBRARIES_AIX]: Renames TARGET_OBJECT_AIX_LIBRARIES. * rs6000-nat.c: Replace TARGET_OBJECT_AIX_LIBRARIES with TARGET_OBJECT_LIBRARIES_AIX throughout. * solib-aix.c: Likwise. --- gdb/rs6000-nat.c | 6 +++--- gdb/solib-aix.c | 6 +++--- gdb/target.h | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/gdb/rs6000-nat.c b/gdb/rs6000-nat.c index a16ccf2..2ac8b43 100644 --- a/gdb/rs6000-nat.c +++ b/gdb/rs6000-nat.c @@ -424,7 +424,7 @@ rs6000_xfer_partial (struct target_ops *ops, enum target_object object, switch (object) { - case TARGET_OBJECT_AIX_LIBRARIES: + case TARGET_OBJECT_LIBRARIES_AIX: return rs6000_xfer_shared_libraries (ops, object, annex, readbuf, writebuf, offset, len); @@ -745,7 +745,7 @@ rs6000_core_ldinfo (bfd *abfd) } /* Append to OBJSTACK an XML string description of the shared library - corresponding to LDI, following the TARGET_OBJECT_AIX_LIBRARIES + corresponding to LDI, following the TARGET_OBJECT_LIBRARIES_AIX format. */ static void @@ -811,7 +811,7 @@ rs6000_xfer_shared_library (LdInfo *ldi, struct obstack *obstack) } /* Implement the to_xfer_partial target_ops method for - TARGET_OBJECT_AIX_LIBRARIES objects. */ + TARGET_OBJECT_LIBRARIES_AIX objects. */ static LONGEST rs6000_xfer_shared_libraries diff --git a/gdb/solib-aix.c b/gdb/solib-aix.c index 8c17a6f..f891af0 100644 --- a/gdb/solib-aix.c +++ b/gdb/solib-aix.c @@ -296,11 +296,11 @@ solib_aix_get_library_list (struct inferior *inf, const char *warning_msg) return data->library_list; library_document = target_read_stralloc (¤t_target, - TARGET_OBJECT_AIX_LIBRARIES, + TARGET_OBJECT_LIBRARIES_AIX, NULL); if (library_document == NULL && warning_msg != NULL) { - warning (_("%s (failed to read TARGET_OBJECT_AIX_LIBRARIES)"), + warning (_("%s (failed to read TARGET_OBJECT_LIBRARIES_AIX)"), warning_msg); return NULL; } @@ -308,7 +308,7 @@ solib_aix_get_library_list (struct inferior *inf, const char *warning_msg) if (solib_aix_debug) fprintf_unfiltered (gdb_stdlog, - "DEBUG: TARGET_OBJECT_AIX_LIBRARIES = \n%s\n", + "DEBUG: TARGET_OBJECT_LIBRARIES_AIX = \n%s\n", library_document); data->library_list = solib_aix_parse_libraries (library_document); diff --git a/gdb/target.h b/gdb/target.h index d77bcf2..8e650cf 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -262,7 +262,7 @@ enum target_object /* Currently loaded libraries specific for SVR4 systems, in XML format. */ TARGET_OBJECT_LIBRARIES_SVR4, /* Currently loaded libraries specific to AIX systems, in XML format. */ - TARGET_OBJECT_AIX_LIBRARIES, + TARGET_OBJECT_LIBRARIES_AIX, /* Get OS specific data. The ANNEX specifies the type (running processes, etc.). The data being transfered is expected to follow the DTD specified in features/osdata.dtd. */ -- 1.7.0.4 --tEFtbjk+mNEviIIX Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0002-AIX-Change-XML-to-use-library-list-aix-instead-of-li.patch" Content-length: 3324 >From c34759e0aad060edfa7db5d6cd3075543a48dad0 Mon Sep 17 00:00:00 2001 From: Joel Brobecker Date: Tue, 7 May 2013 05:40:37 -0400 Subject: [PATCH 2/2] AIX: Change XML to use library-list-aix instead of library-list. This is more consistent with what we do with other similar XML lists, and avoids a potential confusion with the library-list XML list. gdb/ChangeLog: * features/library-list-aix.dtd: Replace library-list by library-list-aix. * rs6000-nat.c: Replace library-list by library-list-aix throughout. * solib-aix.c: Likewise. --- gdb/features/library-list-aix.dtd | 4 ++-- gdb/rs6000-nat.c | 4 ++-- gdb/solib-aix.c | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/gdb/features/library-list-aix.dtd b/gdb/features/library-list-aix.dtd index 5a24ce5..8bf0cc8 100644 --- a/gdb/features/library-list-aix.dtd +++ b/gdb/features/library-list-aix.dtd @@ -5,8 +5,8 @@ notice and this notice are preserved. --> - - + + diff --git a/gdb/rs6000-nat.c b/gdb/rs6000-nat.c index 2ac8b43..afaac5d 100644 --- a/gdb/rs6000-nat.c +++ b/gdb/rs6000-nat.c @@ -841,7 +841,7 @@ rs6000_xfer_shared_libraries /* Convert the raw data into an XML representation. */ obstack_init (&obstack); - obstack_grow_str (&obstack, "\n"); + obstack_grow_str (&obstack, "\n"); ldi = ldi_data; while (1) @@ -860,7 +860,7 @@ rs6000_xfer_shared_libraries xfree (ldi_data); - obstack_grow_str0 (&obstack, "\n"); + obstack_grow_str0 (&obstack, "\n"); buf = obstack_finish (&obstack); len_avail = strlen (buf); diff --git a/gdb/solib-aix.c b/gdb/solib-aix.c index f891af0..d930769 100644 --- a/gdb/solib-aix.c +++ b/gdb/solib-aix.c @@ -179,7 +179,7 @@ library_list_start_library (struct gdb_xml_parser *parser, VEC_safe_push (lm_info_p, *list, item); } -/* Handle the start of a element. */ +/* Handle the start of a element. */ static void library_list_start_list (struct gdb_xml_parser *parser, @@ -213,7 +213,7 @@ solib_aix_free_library_list (void *p) } /* The allowed elements and attributes for an AIX library list - described in XML format. The root element is a . */ + described in XML format. The root element is a . */ static const struct gdb_xml_attribute library_attributes[] = { @@ -242,7 +242,7 @@ static const struct gdb_xml_attribute library_list_attributes[] = static const struct gdb_xml_element library_list_elements[] = { - { "library-list", library_list_attributes, library_list_children, + { "library-list-aix", library_list_attributes, library_list_children, GDB_XML_EF_NONE, library_list_start_list, NULL }, { NULL, NULL, NULL, GDB_XML_EF_NONE, NULL, NULL } }; -- 1.7.0.4 --tEFtbjk+mNEviIIX--