This is because the generic_call_dummy_register_unwind() doesn't deal with
pseudo registers. It has this comment:
/* Return the actual value. */
/* FIXME: cagney/2002-06-26: This should be via the
gdbarch_register_read() method so that it, on the fly,
constructs either a raw or pseudo register from the raw
register cache. */
regcache_raw_read (registers, regnum, bufferp);
If instead of raw reads I do cooked reads, I don't get the error. I
wonder though if, based of the comment, this could be a problem for
other targets.
Thoughts?
Two architecture features could cause problems:2002-08-22 Elena Zannoni <ezannoni@redhat.com>
* blockframe.c (generic_call_dummy_register_unwind): Use
regcache_cooked_read to catch cases in which the variable is
stored in a pseudo register.
Index: blockframe.c
===================================================================
RCS file: /cvs/uberbaum/gdb/blockframe.c,v
retrieving revision 1.37
diff -u -p -r1.37 blockframe.c
--- blockframe.c 18 Aug 2002 22:40:15 -0000 1.37
+++ blockframe.c 22 Aug 2002 15:35:27 -0000
@@ -1406,7 +1406,7 @@ generic_call_dummy_register_unwind (stru
gdbarch_register_read() method so that it, on the fly,
constructs either a raw or pseudo register from the raw
register cache. */
- regcache_raw_read (registers, regnum, bufferp);
+ regcache_cooked_read (registers, regnum, bufferp);
}
}