From: "Dave Korn" <dave.korn@artimi.com>
To: "'Indira'" <yoursindu@gmail.com>, <gdb@sourceware.org>
Subject: RE: Setting registers
Date: Wed, 13 Jun 2007 13:45:00 -0000 [thread overview]
Message-ID: <018d01c7adc0$f10ff770$2e08a8c0@CAM.ARTIMI.COM> (raw)
In-Reply-To: <656b5870706130328v7121cdcdt18c4b59baebc0865@mail.gmail.com>
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 <main+11>
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....
next prev parent reply other threads:[~2007-06-13 13:45 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-13 10:28 Indira
2007-06-13 13:45 ` Dave Korn [this message]
2007-06-15 12:55 ` Indira
2007-06-15 14:37 ` Eli Zaretskii
2007-06-15 14:43 ` Paul Koning
2007-06-15 14:48 ` Daniel Jacobowitz
2007-06-15 15:24 ` Paul Koning
2007-06-15 15:33 ` Daniel Jacobowitz
2007-06-15 16:00 ` Joel Brobecker
2007-06-18 12:01 ` Indira
2007-06-18 12:41 ` Dave Korn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='018d01c7adc0$f10ff770$2e08a8c0@CAM.ARTIMI.COM' \
--to=dave.korn@artimi.com \
--cc=gdb@sourceware.org \
--cc=yoursindu@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox