summaryrefslogtreecommitdiff
path: root/gdb/trad-frame.h
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/trad-frame.h')
-rw-r--r--gdb/trad-frame.h91
1 files changed, 31 insertions, 60 deletions
diff --git a/gdb/trad-frame.h b/gdb/trad-frame.h
index 6af0df301ac..0fe1a5d2c4b 100644
--- a/gdb/trad-frame.h
+++ b/gdb/trad-frame.h
@@ -1,6 +1,6 @@
/* Traditional frame unwind support, for GDB the GNU Debugger.
- Copyright 2003, 2004 Free Software Foundation, Inc.
+ Copyright 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -22,10 +22,18 @@
#ifndef TRAD_FRAME_H
#define TRAD_FRAME_H
+#include "frame.h" /* For "struct frame_id". */
+
struct frame_info;
-struct trad_frame;
-#include "frame.h" /* For frame_id. */
+struct trad_frame_cache
+{
+ CORE_ADDR this_base;
+ struct trad_frame_saved_reg *prev_regs;
+ struct frame_id this_id;
+};
+
+struct trad_frame_cache *trad_frame_cache_zalloc (struct frame_info *next_frame);
/* A traditional saved regs table, indexed by REGNUM, encoding where
the value of REGNUM for the previous frame can be found in this
@@ -59,70 +67,33 @@ struct trad_frame_saved_reg
int realreg;
};
-struct trad_frame_cache
-{
- struct frame_id this_id;
- CORE_ADDR this_base;
- struct trad_frame_saved_reg *saved_regs;
-};
-
-struct trad_frame_cache *trad_frame_cache_zalloc (struct frame_info *next_frame);
-
+/* Encode REGNUM value in the trad-frame. */
+void trad_frame_set_value (struct trad_frame_saved_reg this_saved_regs[],
+ int regnum, LONGEST val);
-/* Encode REGNUM's value in the trad-frame. */
-void trad_frame_set_reg_value (struct trad_frame_cache *this_cache,
- int regnum, LONGEST val);
-void trad_frame_set_reg_addr (struct trad_frame_cache *this_cache,
- int regnum, CORE_ADDR addr);
-void trad_frame_set_reg_reg (struct trad_frame_cache *this_cache,
- int regnum, int realreg);
-void trad_frame_set_reg_unknown (struct trad_frame_cache *this_cache,
- int regnum);
-void trad_frame_set_this_id (struct trad_frame_cache *this_cache,
- struct frame_id *this_id);
-void trad_frame_set_this_base (struct trad_frame_cache *this_cache,
- CORE_ADDR base);
-
-/* Set the offset of a register, and then update all offsets. Useful
- when the offset of a register is known before its absolute
- address. */
-void trad_frame_set_reg_offset (struct trad_frame_cache *this_cache,
- int regnum, LONGEST addr);
-void trad_frame_add_reg_addr (struct trad_frame_cache *this_cache,
- int regnum, CORE_ADDR addr);
+/* Mark REGNUM as unknown. */
+void trad_frame_set_unknown (struct trad_frame_saved_reg this_saved_regs[],
+ int regnum);
/* Convenience functions, return non-zero if the register has been
encoded as specified. */
-int trad_frame_reg_value_p (struct trad_frame_cache *this_cache,
- int regnum);
-int trad_frame_reg_addr_p (struct trad_frame_cache *this_cache,
- int regnum);
-int trad_frame_reg_reg_p (struct trad_frame_cache *this_cache,
+int trad_frame_value_p (struct trad_frame_saved_reg this_saved_regs[],
+ int regnum);
+int trad_frame_addr_p (struct trad_frame_saved_reg this_saved_regs[],
+ int regnum);
+int trad_frame_realreg_p (struct trad_frame_saved_reg this_saved_regs[],
int regnum);
-typedef struct trad_frame_cache *(trad_frame_sniffer_ftype) (const struct trad_frame *self,
- struct frame_info *next_frame);
-
-struct trad_frame
-{
- enum frame_type type;
- trad_frame_sniffer_ftype *sniffer;
- const struct trad_frame_data *trad_data;
-};
-
-void trad_frame_append (struct gdbarch *gdbarch,
- const struct trad_frame *trad_frame);
-void trad_frame_this_id (struct trad_frame_cache *trad_cache,
- struct frame_info *next_frame,
- struct frame_id *this_id);
+/* Return a freshly allocated (and initialized) trad_frame array. */
+struct trad_frame_saved_reg *trad_frame_alloc_saved_regs (struct frame_info *next_frame);
-void trad_frame_prev_register (struct trad_frame_cache *trad_cache,
- struct frame_info *next_frame,
- int prev_regnum,
- int *optimizedp,
- enum lval_type * lvalp,
- CORE_ADDR *addrp,
- int *realnump, void *valuep);
+/* Given the trad_frame info, return the location of the specified
+ register. */
+void trad_frame_prev_register (struct frame_info *next_frame,
+ struct trad_frame_saved_reg this_saved_regs[],
+ int regnum, int *optimizedp,
+ enum lval_type *lvalp, CORE_ADDR *addrp,
+ int *realregp, void *bufferp);
#endif