* frame.h (read_frame_local): Declare.
	* mi/mi-cmd-stack.c (list_args_or_locals): Call
	read_frame_local.
	* stack.c (read_frame_local): New.

gdb/testsuite/

	* gdb.trace/mi-trace-unavailable.exp: Don't set
	"print entry-values" to "no".
	(test_trace_unavailable): Set various values to
	"print entry-values" to test that the output of
	'-stack-list-locals' is not affected, and then set
	set "print entry-values" to "no".
This commit is contained in:
Yao Qi 2013-08-08 05:10:10 +00:00
parent 5c4aa40b93
commit 82a0a75ff0
6 changed files with 59 additions and 4 deletions

View file

@ -301,6 +301,27 @@ print_frame_arg (const struct frame_arg *arg)
annotate_arg_end ();
}
/* Read in inferior function local SYM at FRAME into ARGP. Caller is
responsible for xfree of ARGP->ERROR. This function never throws an
exception. */
void
read_frame_local (struct symbol *sym, struct frame_info *frame,
struct frame_arg *argp)
{
volatile struct gdb_exception except;
struct value *val = NULL;
TRY_CATCH (except, RETURN_MASK_ERROR)
{
val = read_var_value (sym, frame);
}
argp->error = (val == NULL) ? xstrdup (except.message) : NULL;
argp->sym = sym;
argp->val = val;
}
/* Read in inferior function parameter SYM at FRAME into ARGP. Caller is
responsible for xfree of ARGP->ERROR. This function never throws an
exception. */