This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Set ADDR
- From: Andrew Cagney <ac131313 at ges dot redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Tue, 20 Aug 2002 23:33:53 -0400
- Subject: Set ADDR
Hello,
The bug below and the attached patch are just scary!
(top-gdb) print $r0
$4 = 209
(top-gdb) print $r2
$5 = 0
(top-gdb) set $r2 = 0
(top-gdb) print $r2
$6 = 0
(top-gdb) print $r0
$7 = 0
``addr'' the offset into the registers buffer wasn't being set which
would lead to register zero always being set.
The worry is that I didn't pick up any testsuite failures :-(
committed the attached,
Andrew
2002-08-19 Andrew Cagney <ac131313@redhat.com>
* frame.c (frame_register_unwind): When a register, set addrp to
the register's byte.
Index: frame.c
===================================================================
RCS file: /cvs/src/src/gdb/frame.c,v
retrieving revision 1.14
diff -u -r1.14 frame.c
--- frame.c 6 Aug 2002 22:42:56 -0000 1.14
+++ frame.c 21 Aug 2002 03:16:11 -0000
@@ -142,7 +142,9 @@
register cache. */
*optimizedp = 0;
*lvalp = lval_register;
- *addrp = 0;
+ /* ULGH! Code uses the offset into the raw register byte array
+ as a way of identifying a register. */
+ *addrp = REGISTER_BYTE (regnum);
/* Should this code test ``register_cached (regnum) < 0'' and do
something like set realnum to -1 when the register isn't
available? */