From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3096 invoked by alias); 15 Jun 2007 14:43:04 -0000 Received: (qmail 3070 invoked by uid 22791); 15 Jun 2007 14:43:03 -0000 X-Spam-Check-By: sourceware.org Received: from exprod8og53.obsmtp.com (HELO exprod8og53.obsmtp.com) (64.18.3.88) by sourceware.org (qpsmtpd/0.31) with SMTP; Fri, 15 Jun 2007 14:43:00 +0000 Received: from source ([12.110.134.31]) by exprod8ob53.obsmtp.com ([64.18.7.12]) with SMTP; Fri, 15 Jun 2007 07:42:52 PDT Received: from pkoning.equallogic.com.equallogic.com ([172.25.202.120]) by M31.equallogic.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 15 Jun 2007 10:41:40 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18034.42274.624904.560657@pkoning.equallogic.com> Date: Fri, 15 Jun 2007 14:43:00 -0000 From: Paul Koning To: eliz@gnu.org Cc: yoursindu@gmail.com, dave.korn@artimi.com, gdb@sourceware.org Subject: Re: Setting registers References: <656b5870706130328v7121cdcdt18c4b59baebc0865@mail.gmail.com> <018d01c7adc0$f10ff770$2e08a8c0@CAM.ARTIMI.COM> <656b5870706150555k47cf81c6w393d14502018b80b@mail.gmail.com> X-Mailer: VM 7.17 under 21.4 (patch 19) "Constant Variable" XEmacs Lucid 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: 2007-06/txt/msg00125.txt.bz2 >>>>> "Eli" == Eli Zaretskii writes: >> Date: Fri, 15 Jun 2007 18:25:53 +0530 From: Indira >> Cc: gdb@sourceware.org >> >> Yes I am debuggin a core file. We cant set registers while >> debuggin a core file? Eli> No, you can't. The program is dead, all you have is the last Eli> snapshot of its memory. Even if you could set registers (and Eli> other variables), it would be of no practical use, since you Eli> cannot run the program. All you can do is examine its memory Eli> and call stack. Sometimes it would be useful to be able to. If the stack is corrupt, or the return address (for processor types that have such a thing) and you can figure out the correct values, it would be very handy to be able to tell gdb "here is the right value" and let it use that for subsequent analysis. Right now, that's not possible. So if I have a smashed stack, I have to walk it by hand -- which means looking at local variables is essentially undoable. It's not always simply a matter of giving the right SP to gdb, but often it is. paul