From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16204 invoked by alias); 4 Nov 2009 18:29:47 -0000 Received: (qmail 16195 invoked by uid 22791); 4 Nov 2009 18:29:47 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from smtp-outbound-1.vmware.com (HELO smtp-outbound-1.vmware.com) (65.115.85.69) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 04 Nov 2009 18:29:42 +0000 Received: from jupiter.vmware.com (mailhost5.vmware.com [10.16.68.131]) by smtp-outbound-1.vmware.com (Postfix) with ESMTP id 0CF8F2E034; Wed, 4 Nov 2009 10:29:41 -0800 (PST) Received: from [10.20.94.141] (msnyder-server.eng.vmware.com [10.20.94.141]) by jupiter.vmware.com (Postfix) with ESMTP id 02D13DC067; Wed, 4 Nov 2009 10:29:41 -0800 (PST) Message-ID: <4AF1C806.2010802@vmware.com> Date: Wed, 04 Nov 2009 18:29:00 -0000 From: Michael Snyder User-Agent: Thunderbird 1.5.0.12 (X11/20090624) MIME-Version: 1.0 To: Hui Zhu CC: "gdb@sourceware.org" Subject: Re: About the gdb prec save/restore reverse exec behavior error (gcore error) References: <4AEC74B8.9090908@vmware.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2009-11/txt/msg00038.txt.bz2 Hui Zhu wrote: > Hi Michael, > > I make a patch to fix it. I try in i386-ubuntu. It is OK now. > Please help me review it. > > Thanks, > Hui > > 2009-11-04 Hui Zhu > > * gcore.c (gcore_copy_callback): Remove bfd_get_section_flags check. > > --- > gcore.c | 4 ---- > 1 file changed, 4 deletions(-) > > --- a/gcore.c > +++ b/gcore.c > @@ -510,10 +510,6 @@ gcore_copy_callback (bfd *obfd, asection > struct cleanup *old_chain = NULL; > void *memhunk; > > - /* Read-only sections are marked; we don't have to copy their contents. */ > - if ((bfd_get_section_flags (obfd, osec) & SEC_LOAD) == 0) > - return; > - > /* Only interested in "load" sections. */ > if (strncmp ("load", bfd_section_name (obfd, osec), 4) != 0) > return; > No, this is not acceptable. We can't save ALL of the loadable sections, it will make the gcore file much bigger than necessary. Most loadable sections are code, and do not need to be saved. We will need to choose explicitly just the loadable sections that we need to save.