From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15271 invoked by alias); 29 May 2013 10:17:01 -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 15260 invoked by uid 89); 29 May 2013 10:17:00 -0000 X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED autolearn=ham version=3.3.1 Received: from gbenson.demon.co.uk (HELO blade.nx) (80.177.220.214) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Wed, 29 May 2013 10:16:59 +0000 Received: by blade.nx (Postfix, from userid 500) id 67D22264615; Wed, 29 May 2013 11:16:56 +0100 (BST) Date: Wed, 29 May 2013 10:17:00 -0000 From: Gary Benson To: Ben Cheng Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] Ignore the first entry returned by svr4_current_sos_via_xfer_libraries for dynamically linked programs Message-ID: <20130529101656.GA5101@blade.nx> Mail-Followup-To: Ben Cheng , gdb-patches@sourceware.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SW-Source: 2013-05/txt/msg00990.txt.bz2 Ben Cheng wrote: > The first entry in the xml list returned by > svr4_current_sos_via_xfer_libraries() is the executable itself. For > dynamically linked programs, the existing code that deals with > gdbserver that doesn't support svr4_current_sos_via_xfer_libraries > is ignoring the first entry. This patch applies the same logic on > the result returned by svr4_current_sos_via_xfer_libraries(). > > See GDB PR/15507 for more details. > > -- > > 2013-05-28 Ben Cheng > > PR gdb/15507: > * solib-svr4.c (svr4_current_sos): Ignore the first library list > entry returned by svr4_current_sos_via_xfer_libraries call for > dynamically linked programs. > > Index: solib-svr4.c > =================================================================== > RCS file: /cvs/src/src/gdb/solib-svr4.c,v > retrieving revision 1.178 > diff -r1.178 solib-svr4.c > 1285c1285,1291 > < return library_list.head ? library_list.head : svr4_default_sos (); > --- > > /* Use the same logic that determines the 'ignore_first' variable > > below. PR - 15507 */ > > if (exec_bfd && bfd_get_section_by_name (exec_bfd, ".dynamic") == NULL) > > return library_list.head ? library_list.head : svr4_default_sos (); > > else > > return library_list.head && library_list.head->next ? > > library_list.head->next : svr4_default_sos (); This seems reasonable to me, though in future please use "diff -u" to generate patches. Thanks, Gary -- http://gbenson.net/