2003-04-01 Andrew Cagney <cagney@redhat.com>

Add frame debug info addresses:
	* frame-base.c: New file.
	* frame-base.h: New file.
	* frame.h (struct frame_base): Add opaque declaration.
	(get_frame_base): Update comment.
	(get_frame_base_address): Declare.
	(get_frame_locals_address): Declare.
	(get_frame_args_address): Declare.
	(struct frame_info): Add "base" and "base_cache".  Update
	comments on the unwinder.
	* frame.c: Include "frame-base.h".
	(get_frame_locals_address): New function.
	(get_frame_base_address): New function.
	(get_frame_args_address): New function.
	* findvar.c (read_var_value): Use get_frame_locals_address and
	get_frame_args_address.
	* stack.c (frame_info): Use get_frame_locals_address and
	get_frame_args_address.
	(FRAME_ARGS_ADDRESS_CORRECT): Delete conditionally defined macro,
	moved to "frame-base.c".
	* printcmd.c (print_frame_nameless_args): Ditto.
	* symtab.h (address_class): Update comments.
	* dwarf2loc.c (dwarf_expr_frame_base): Add note about
	get_frame_base_address.
	* dwarf2expr.c (execute_stack_op): Ditto.
	* Makefile.in (frame_base_h): Define.
	(frame.o): Update dependencies.
	(frame-base.o): Add dependencies.
	(SFILES): Add frame-base.c.
	(COMMON_OBS): Add frame-base.o.
This commit is contained in:
Andrew Cagney
2003-04-01 19:11:01 +00:00
parent 3d30e9c264
commit da62e63311
11 changed files with 400 additions and 61 deletions

View File

@ -600,16 +600,6 @@ parse_frame_specification (char *frame_exp)
/* NOTREACHED */
}
/* FRAME_ARGS_ADDRESS_CORRECT is just like FRAME_ARGS_ADDRESS except
that if it is unsure about the answer, it returns 0
instead of guessing (this happens on the VAX and i960, for example).
On most machines, we never have to guess about the args address,
so FRAME_ARGS_ADDRESS{,_CORRECT} are the same. */
#if !defined (FRAME_ARGS_ADDRESS_CORRECT)
#define FRAME_ARGS_ADDRESS_CORRECT FRAME_ARGS_ADDRESS
#endif
/* Print verbosely the selected frame or the frame at address ADDR.
This means absolutely all information in the frame is printed. */
@ -743,7 +733,7 @@ frame_info (char *addr_exp, int from_tty)
{
/* Address of the argument list for this frame, or 0. */
CORE_ADDR arg_list = FRAME_ARGS_ADDRESS_CORRECT (fi);
CORE_ADDR arg_list = get_frame_args_address (fi);
/* Number of args for this frame, or -1 if unknown. */
int numargs;
@ -770,7 +760,7 @@ frame_info (char *addr_exp, int from_tty)
}
{
/* Address of the local variables for this frame, or 0. */
CORE_ADDR arg_list = FRAME_LOCALS_ADDRESS (fi);
CORE_ADDR arg_list = get_frame_locals_address (fi);
if (arg_list == 0)
printf_filtered (" Locals at unknown address,");