From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10142 invoked by alias); 13 Jun 2007 13:45:49 -0000 Received: (qmail 10133 invoked by uid 22791); 13 Jun 2007 13:45:48 -0000 X-Spam-Check-By: sourceware.org Received: from mail.artimi.com (HELO mail.artimi.com) (194.72.81.2) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 13 Jun 2007 13:45:46 +0000 Received: from rainbow ([192.168.8.46]) by mail.artimi.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 13 Jun 2007 14:44:17 +0100 From: "Dave Korn" To: "'Indira'" , References: <656b5870706130328v7121cdcdt18c4b59baebc0865@mail.gmail.com> Subject: RE: Setting registers Date: Wed, 13 Jun 2007 13:45:00 -0000 Message-ID: <018d01c7adc0$f10ff770$2e08a8c0@CAM.ARTIMI.COM> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <656b5870706130328v7121cdcdt18c4b59baebc0865@mail.gmail.com> 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/msg00109.txt.bz2 On 13 June 2007 11:28, Indira wrote: > Hi, > > I was writing a macro in which i was trying to the variable ebp and eip as, > > set variable $ebp = *(int *)($sp+8) > set variable $eip = *(int *)($sp+36) > > but, even though by doing this th eregister values dont get updated. > Why is this so? Can anyone help me on this? Dunno, works fine for me: Breakpoint 1, main () at time.c:13 13 { double t0 = get_time(), t1 = get_time(); (gdb) info regis eax 0x10 16 ecx 0x401080 4198528 edx 0x4c 76 ebx 0x0 0 esp 0x23cc80 0x23cc80 ebp 0x23ccb8 0x23ccb8 esi 0x611001a0 1628438944 edi 0x401430 4199472 eip 0x40108b 0x40108b eflags 0x202 [ IF ] cs 0x1b 27 ss 0x23 35 ds 0x23 35 es 0x23 35 fs 0x3b 59 gs 0x0 0 (gdb) set variable $ebp = *(int *)($sp+8) (gdb) set variable $eip = *(int *)($sp+36) (gdb) info regis eax 0x10 16 ecx 0x401080 4198528 edx 0x4c 76 ebx 0x0 0 esp 0x23cc80 0x23cc80 ebp 0x61166a78 0x61166a78 esi 0x611001a0 1628438944 edi 0x401430 4199472 eip 0x2f 0x2f eflags 0x202 [ IF ] cs 0x1b 27 ss 0x23 35 ds 0x23 35 es 0x23 35 fs 0x3b 59 gs 0x0 0 (gdb) You're not by any chance trying to debug a core file are you? cheers, DaveK -- Can't think of a witty .sigline today....