This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug gdb/13487] New: Hook for next command shows previous value forregister.
- From: "ray.seyfarth at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Fri, 09 Dec 2011 01:15:07 +0000
- Subject: [Bug gdb/13487] New: Hook for next command shows previous value forregister.
- Auto-submitted: auto-generated
http://sourceware.org/bugzilla/show_bug.cgi?id=13487
Bug #: 13487
Summary: Hook for next command shows previous value for
register.
Product: gdb
Version: 7.3
Status: NEW
Severity: enhancement
Priority: P2
Component: gdb
AssignedTo: unassigned@sourceware.org
ReportedBy: ray.seyfarth@gmail.com
Classification: Unclassified
When you enter a hook for the next command which refers to a register, the
value of the register is what it was before the instruction was executed. This
matters in assembly programming. Let's suppose you enter:
define hook-next
print $rsp
end
If the value of $rsp is 0x7ffffff8050 and the next instruction is "sub rsp,
80", the value printed after issuing the "next" command remains as
0x7fffffff8050. After the next "next" command the hook will print
0x7fffffff8000.
This is a minor issue. It probably will confuse beginning assembly
programmers, but people with more experience will guess rapidly what is
happening. In my case I have this as part of a package using python scripts
which will allow watching various things including the top elements of the
stack. My students will be less confused if the value is immediately available
to the hook-next macro.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.