aboutsummaryrefslogtreecommitdiff
path: root/gdb/frame.h
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2003-02-02 20:31:43 +0000
committerAndrew Cagney <cagney@redhat.com>2003-02-02 20:31:43 +0000
commit5b181d62776936b5547a8d25db77b07517bfddea (patch)
tree265dd5003ea4f7e3775aa5c168eafb2687862e16 /gdb/frame.h
parent5e0116d519c197dbd989e07c5e011e7a0dfd73c7 (diff)
downloadgdb-5b181d62776936b5547a8d25db77b07517bfddea.zip
gdb-5b181d62776936b5547a8d25db77b07517bfddea.tar.gz
gdb-5b181d62776936b5547a8d25db77b07517bfddea.tar.bz2
2003-02-02 Andrew Cagney <ac131313@redhat.com>
* frame.c (frame_unwind_register): New function. (frame_unwind_unsigned_register): Use. (frame_unwind_signed_register): Use. (frame_read_register): New function. * frame.h (frame_unwind_register): Declare. (frame_read_register): Declare. * d10v-tdep.c (d10v_frame_pop): Rewrite. Use regcache_cooked_write and frame_unwind_register instead of read_memory, write_register and deprecated_write_register_bytes.
Diffstat (limited to 'gdb/frame.h')
-rw-r--r--gdb/frame.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/gdb/frame.h b/gdb/frame.h
index dc90e0a..8169173 100644
--- a/gdb/frame.h
+++ b/gdb/frame.h
@@ -263,6 +263,9 @@ extern void frame_register_unwind (struct frame_info *frame, int regnum,
/* NOTE: cagney/2002-09-13: Return void as one day these functions may
be changed to return an indication that the read succeeded. */
+extern void frame_unwind_register (struct frame_info *frame,
+ int regnum, void *buf);
+
extern void frame_unwind_signed_register (struct frame_info *frame,
int regnum, LONGEST *val);
@@ -283,6 +286,9 @@ extern void frame_register (struct frame_info *frame, int regnum,
/* NOTE: cagney/2002-09-13: Return void as one day these functions may
be changed to return an indication that the read succeeded. */
+extern void frame_read_register (struct frame_info *frame, int regnum,
+ void *buf);
+
extern void frame_read_signed_register (struct frame_info *frame,
int regnum, LONGEST *val);
@@ -563,6 +569,16 @@ extern void get_saved_register (char *raw_buffer, int *optimized,
struct frame_info *frame,
int regnum, enum lval_type *lval);
+/* FIXME: cagney/2003-02-02: Should be deprecated or replaced with a
+ function called frame_read_register_p(). This slightly weird (and
+ older) variant of frame_read_register() returns zero (indicating
+ the register is unavailable) if either: the register isn't cached;
+ or the register has been optimized out. Problem is, neither check
+ is exactly correct. A register can't be optimized out (it may not
+ have been saved as part of a function call); The fact that a
+ register isn't in the register cache doesn't mean that the register
+ isn't available (it could have been fetched from memory). */
+
extern int frame_register_read (struct frame_info *frame, int regnum,
void *buf);