+ gdb_byte *valuep);
+
+/* Fetch a register from this, or unwind a register from the next
+ frame. Note that the get_frame methods are wrappers to
+ frame->next->unwind. They all [potentially] throw an error if the
+ fetch fails. The value methods never return NULL, but usually
+ do return a lazy value. */
+
+extern void frame_unwind_register (struct frame_info *frame,
+ int regnum, gdb_byte *buf);
+extern void get_frame_register (struct frame_info *frame,
+ int regnum, gdb_byte *buf);
+
+struct value *frame_unwind_register_value (struct frame_info *frame,
+ int regnum);
+struct value *get_frame_register_value (struct frame_info *frame,
+ int regnum);
+
+extern LONGEST frame_unwind_register_signed (struct frame_info *frame,
+ int regnum);
+extern LONGEST get_frame_register_signed (struct frame_info *frame,
+ int regnum);
+extern ULONGEST frame_unwind_register_unsigned (struct frame_info *frame,
+ int regnum);
+extern ULONGEST get_frame_register_unsigned (struct frame_info *frame,
+ int regnum);
+
+
+/* Get the value of the register that belongs to this FRAME. This
+ function is a wrapper to the call sequence ``frame_register_unwind
+ (get_next_frame (FRAME))''. As per frame_register_unwind(), if
+ VALUEP is NULL, the registers value is not fetched/computed. */
+
+extern void frame_register (struct frame_info *frame, int regnum,
+ int *optimizedp, enum lval_type *lvalp,
+ CORE_ADDR *addrp, int *realnump,
+ gdb_byte *valuep);
+
+/* The reverse. Store a register value relative to the specified
+ frame. Note: this call makes the frame's state undefined. The
+ register and frame caches must be flushed. */
+extern void put_frame_register (struct frame_info *frame, int regnum,
+ const gdb_byte *buf);
+
+/* Read LEN bytes from one or multiple registers starting with REGNUM
+ in frame FRAME, starting at OFFSET, into BUF. */
+extern int get_frame_register_bytes (struct frame_info *frame, int regnum,
+ CORE_ADDR offset, int len,
+ gdb_byte *myaddr);
+
+/* Write LEN bytes to one or multiple registers starting with REGNUM
+ in frame FRAME, starting at OFFSET, into BUF. */
+extern void put_frame_register_bytes (struct frame_info *frame, int regnum,
+ CORE_ADDR offset, int len,
+ const gdb_byte *myaddr);
+
+/* Unwind the PC. Strictly speaking return the resume address of the
+ calling frame. For GDB, `pc' is the resume address and not a
+ specific register. */
+
+extern CORE_ADDR frame_unwind_caller_pc (struct frame_info *frame);
+
+/* Discard the specified frame. Restoring the registers to the state
+ of the caller. */
+extern void frame_pop (struct frame_info *frame);
+
+/* Return memory from the specified frame. A frame knows its thread /
+ LWP and hence can find its way down to a target. The assumption
+ here is that the current and previous frame share a common address
+ space.
+
+ If the memory read fails, these methods throw an error.
+
+ NOTE: cagney/2003-06-03: Should there be unwind versions of these
+ methods? That isn't clear. Can code, for instance, assume that
+ this and the previous frame's memory or architecture are identical?
+ If architecture / memory changes are always separated by special
+ adaptor frames this should be ok. */
+
+extern void get_frame_memory (struct frame_info *this_frame, CORE_ADDR addr,
+ gdb_byte *buf, int len);
+extern LONGEST get_frame_memory_signed (struct frame_info *this_frame,
+ CORE_ADDR memaddr, int len);
+extern ULONGEST get_frame_memory_unsigned (struct frame_info *this_frame,
+ CORE_ADDR memaddr, int len);
+
+/* Same as above, but return non-zero when the entire memory read
+ succeeds, zero otherwize. */
+extern int safe_frame_unwind_memory (struct frame_info *this_frame,
+ CORE_ADDR addr, gdb_byte *buf, int len);
+
+/* Return this frame's architecture. */
+
+extern struct gdbarch *get_frame_arch (struct frame_info *this_frame);
+
+
+/* Values for the source flag to be used in print_frame_info_base(). */
+enum print_what
+ {
+ /* Print only the source line, like in stepi. */
+ SRC_LINE = -1,
+ /* Print only the location, i.e. level, address (sometimes)
+ function, args, file, line, line num. */
+ LOCATION,
+ /* Print both of the above. */
+ SRC_AND_LOC,
+ /* Print location only, but always include the address. */
+ LOC_AND_ADDRESS
+ };
+
+/* Allocate zero initialized memory from the frame cache obstack.
+ Appendices to the frame info (such as the unwind cache) should
+ allocate memory using this method. */
+
+extern void *frame_obstack_zalloc (unsigned long size);
+#define FRAME_OBSTACK_ZALLOC(TYPE) ((TYPE *) frame_obstack_zalloc (sizeof (TYPE)))
+#define FRAME_OBSTACK_CALLOC(NUMBER,TYPE) ((TYPE *) frame_obstack_zalloc ((NUMBER) * sizeof (TYPE)))
+
+/* Create a regcache, and copy the frame's registers into it. */
+struct regcache *frame_save_as_regcache (struct frame_info *this_frame);
+
+extern struct block *get_frame_block (struct frame_info *,
+ CORE_ADDR *addr_in_block);
+
+/* Return the `struct block' that belongs to the selected thread's
+ selected frame. If the inferior has no state, return NULL.
+
+ NOTE: cagney/2002-11-29:
+
+ No state? Does the inferior have any execution state (a core file
+ does, an executable does not). At present the code tests
+ `target_has_stack' but I'm left wondering if it should test
+ `target_has_registers' or, even, a merged target_has_state.
+
+ Should it look at the most recently specified SAL? If the target
+ has no state, should this function try to extract a block from the
+ most recently selected SAL? That way `list foo' would give it some
+ sort of reference point. Then again, perhaps that would confuse
+ things.
+
+ Calls to this function can be broken down into two categories: Code
+ that uses the selected block as an additional, but optional, data
+ point; Code that uses the selected block as a prop, when it should
+ have the relevant frame/block/pc explicitly passed in.
+
+ The latter can be eliminated by correctly parameterizing the code,
+ the former though is more interesting. Per the "address" command,
+ it occurs in the CLI code and makes it possible for commands to
+ work, even when the inferior has no state. */
+
+extern struct block *get_selected_block (CORE_ADDR *addr_in_block);
+
+extern struct symbol *get_frame_function (struct frame_info *);
+
+extern CORE_ADDR get_pc_function_start (CORE_ADDR);
+
+extern struct frame_info *find_relative_frame (struct frame_info *, int *);
+
+extern void show_and_print_stack_frame (struct frame_info *fi, int print_level,
+ enum print_what print_what);