From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18261 invoked by alias); 8 Nov 2009 20:04:22 -0000 Received: (qmail 18248 invoked by uid 22791); 8 Nov 2009 20:04:22 -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-2.vmware.com (HELO smtp-outbound-2.vmware.com) (65.115.85.73) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 08 Nov 2009 20:04:18 +0000 Received: from mailhost2.vmware.com (mailhost2.vmware.com [10.16.67.167]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id C010636037; Sun, 8 Nov 2009 12:04:15 -0800 (PST) Received: from [10.20.94.141] (msnyder-server.eng.vmware.com [10.20.94.141]) by mailhost2.vmware.com (Postfix) with ESMTP id B5FAD8E59B; Sun, 8 Nov 2009 12:04:15 -0800 (PST) Message-ID: <4AF72404.1070808@vmware.com> Date: Sun, 08 Nov 2009 20:04:00 -0000 From: Michael Snyder User-Agent: Thunderbird 1.5.0.12 (X11/20090624) MIME-Version: 1.0 To: Daniel Gutson CC: "gdb-patches@sourceware.org" Subject: Re: [PATCH] gcore registers storing fix References: <4AF4A505.4010600@codesourcery.com> In-Reply-To: <4AF4A505.4010600@codesourcery.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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: 2009-11/txt/msg00130.txt.bz2 Daniel Gutson wrote: > The attached patch attempts to solve a bug that caused the gcore command > to produce core files containing incorrect registers information. The > problem caused incomplete backtraces when the files were read back into GDB. > > I tested this patch with the gdb testsuite, and my addition to the > gcore-thread.exp test case. > > If OK, please commit it for me since I don't have write access. What host configuration is this for? At first glance, the procfs change looks ok (but I'm no longer up to date on procfs). I have some doubt about the test change. You say in your comment, "The threads should be standing at a known function, rather than ??". I'm not sure how we can know that. The threads may have been stopped anywhere, and it's always possible to find a library with no symbols. > 2009-11-06 Daniel Gutson > > gdb/ > * procfs.c (procfs_do_thread_registers): Added a call to fetch > register values before saving them in the core file > through the gcore command. > (procfs_corefile_thread_callback): removed the backup of > inferior_ptid before calling procfs_do_thread_registers since > the function already saves and restores it before returning. > > gdb/testsuite/gdb.threads/ > * gcore-thread.exp: Added a test case in order to check > if the core dump contains the registers values, and symbol > lookup is working properly. >