Code reshuffle.
	* frame.h (struct frame_arg): New definition.
	(read_frame_arg): New declaration.
	* mi/mi-cmd-stack.c (list_arg_or_local): New functiom from ...
	(list_args_or_locals): ... the code here.  New variable arg, call
	read_frame_arg and list_arg_or_local with it.  Unify the
	PRINT_SIMPLE_VALUES and PRINT_ALL_VALUES cases.  Call xfree for
	arg.error.
	* stack.c (print_frame_arg): New functiom from the code of
	print_frame_args.
	(read_frame_arg): New function.
	(print_frame_args): Remove variable val.  New variable arg, call
	read_frame_arg and print_frame_arg with it.  Call xfree for arg.error.
This commit is contained in:
Jan Kratochvil
2011-10-09 19:30:25 +00:00
parent 2d6c5dc2c7
commit 93d86cefdf
4 changed files with 229 additions and 113 deletions

View File

@@ -711,6 +711,26 @@ extern int frame_register_read (struct frame_info *frame, int regnum,
gdb_byte *buf);
/* From stack.c. */
/* Inferior function parameter value read in from a frame. */
struct frame_arg
{
/* Symbol for this parameter used for example for its name. */
struct symbol *sym;
/* Value of the parameter. It is NULL if ERROR is not NULL; if both VAL and
ERROR are NULL this parameter's value should not be printed. */
struct value *val;
/* String containing the error message, it is more usually NULL indicating no
error occured reading this parameter. */
char *error;
};
extern void read_frame_arg (struct symbol *sym, struct frame_info *frame,
struct frame_arg *argp);
extern void args_info (char *, int);
extern void locals_info (char *, int);