old-cross-binutils/gdb/testsuite/gdb.trace
Yao Qi 6211c335ec Add options to skip unavailable locals
This is the patch to add new option '--skip-unavailable' to MI
commands '-stack-list-{locals, arguments, variables}'.  This patch
extends list_args_or_locals to add a new parameter 'skip_unavailable',
and don't list locals or arguments if values are unavailable and
'skip_unavailable' is true.

This is inspecting a trace frame (tfind mode), where only a few
locals have been collected.

-stack-list-locals, no switch vs new switch:

 -stack-list-locals --simple-values
 ^done,locals=[{name="array",type="unsigned char [2]"},{name="i",type="int",value="<unavailable>"}]
 -stack-list-locals --skip-unavailable --simple-values
 ^done,locals=[{name="array",type="unsigned char [2]"}]

-stack-list-arguments, no switch vs new switch:

 -stack-list-arguments --simple-values
 ^done,stack-args=[frame={level="0",args=[{name="j",type="int",value="4"},{name="s",type="char *",value="<unavailable>"}]},frame={level="1",args=[]}]
 -stack-list-arguments --skip-unavailable --simple-values
 ^done,stack-args=[frame={level="0",args=[{name="j",type="int",value="4"}]},frame={level="1",args=[]}]

-stack-list-variables, no switch vs new switch:

 -stack-list-variables --simple-values
 ^done,variables=[{name="j",arg="1",type="int",value="4"},{name="s",arg="1",type="char *",value="<unavailable>"},{name="array",type="unsigned char [2]"},{name="i",type="int",value="<unavailable>"}]
 -stack-list-variables --skip-unavailable --simple-values
 ^done,variables=[{name="j",arg="1",type="int",value="4"},{name="array",type="unsigned char [2]"}]

tests are added to test these new options.

gdb:

2013-08-27  Pedro Alves  <pedro@codesourcery.com>
	    Yao Qi  <yao@codesourcery.com>

	* mi/mi-cmd-stack.c (list_args_or_locals): Adjust prototype.
	(parse_no_frames_option): Remove.
	(mi_cmd_stack_list_locals): Handle --skip-unavailable.
	(mi_cmd_stack_list_args): Adjust.
	(mi_cmd_stack_list_variables): Handle --skip-unavailable.
	(list_arg_or_local): Add new parameter 'skip_unavailable'.  Return
	early if SKIP_UNAVAILABLE is true and ARG->val is unavailable.
	Caller update.
	(list_args_or_locals): New parameter 'skip_unavailable'.
	Handle it.
	* valprint.c (scalar_type_p): Rename to ...
	(val_print_scalar_type_p): ... this.  Make extern.
	(val_print, value_check_printable): Adjust.
	* valprint.h (val_print_scalar_type_p): Declare.
	* value.c (value_entirely_unavailable): New function.
	* value.h (value_entirely_unavailable): Declare.

	* NEWS: Mention the new option "--skip-unavailable" to MI
	commands '-stack-list-locals', '-stack-list-arguments' and
	'-stack-list-variables'.

gdb/doc:

2013-08-27  Pedro Alves  <pedro@codesourcery.com>
	    Yao Qi  <yao@codesourcery.com>

	* gdb.texinfo (GDB/MI Stack Manipulation) <-stack-list-locals>:
	Document new --skip-unavailable option.
	<-stack-list-variables>: Document new --skip-unavailable option.

gdb/testsuite:

2013-08-27  Yao Qi  <yao@codesourcery.com>

	* gdb.trace/entry-values.exp: Test unavailable entry value is
	not shown when option '--skip-unavailable' is specified.
	* gdb.trace/mi-trace-unavailable.exp (test_trace_unavailable):
	Add tests for new option '--skip-unavailable'.
2013-08-27 05:20:57 +00:00
..
actions-changed.c tracepoint->step_count fixes 2013-04-04 19:22:38 +00:00
actions-changed.exp Remove superfluous semicolons from testsuite throughout. 2013-06-07 17:31:09 +00:00
actions.c gdb/testsuite/ 2013-03-26 12:46:24 +00:00
actions.exp * gdb.trace/actions.exp (check_tracepoint): Don't use a full file 2013-06-21 17:18:45 +00:00
ax.exp Remove superfluous semicolons from testsuite throughout. 2013-06-07 17:31:09 +00:00
backtrace.exp gdb/ 2013-07-31 00:44:42 +00:00
change-loc-1.c
change-loc-2.c
change-loc.c
change-loc.exp Remove superfluous semicolons from testsuite throughout. 2013-06-07 17:31:09 +00:00
change-loc.h
circ.c gdb/testsuite/ 2013-03-26 12:46:24 +00:00
circ.exp 2013-05-08 Hafiz Abid Qadeer <abidh@codesourcery.com> 2013-05-08 16:15:02 +00:00
collection.c gdb/testsuite/ 2013-03-26 12:46:24 +00:00
collection.exp gdb/ 2013-08-09 00:35:40 +00:00
deltrace.exp Remove superfluous semicolons from testsuite throughout. 2013-06-07 17:31:09 +00:00
disconnected-tracing.c
disconnected-tracing.exp Remove superfluous semicolons from testsuite throughout. 2013-06-07 17:31:09 +00:00
entry-values.c gdb/testsuite/ 2013-08-24 01:54:59 +00:00
entry-values.exp Add options to skip unavailable locals 2013-08-27 05:20:57 +00:00
ftrace.c
ftrace.exp Remove superfluous semicolons from testsuite throughout. 2013-06-07 17:31:09 +00:00
infotrace.exp Remove superfluous semicolons from testsuite throughout. 2013-06-07 17:31:09 +00:00
Makefile.in tracepoint->step_count fixes 2013-04-04 19:22:38 +00:00
mi-trace-frame-collected.exp gdb/testsuite/ 2013-06-26 08:28:27 +00:00
mi-trace-unavailable.exp Add options to skip unavailable locals 2013-08-27 05:20:57 +00:00
mi-traceframe-changed.exp test suite fixlet for gdb.trace 2013-07-16 18:48:31 +00:00
mi-tracepoint-changed.exp gdb/testsuite/ 2013-03-15 01:41:29 +00:00
mi-tsv-changed.exp gdb/testsuite/ 2013-03-15 01:41:29 +00:00
packetlen.exp gdb/testsuite/ 2013-03-14 13:34:06 +00:00
passc-dyn.exp Remove superfluous semicolons from testsuite throughout. 2013-06-07 17:31:09 +00:00
passcount.exp Remove superfluous semicolons from testsuite throughout. 2013-06-07 17:31:09 +00:00
pending.c
pending.exp Remove superfluous semicolons from testsuite throughout. 2013-06-07 17:31:09 +00:00
pendshr1.c
pendshr2.c
qtro.c PR remote/15455 - QTro remote packet broken 2013-05-10 13:59:45 +00:00
qtro.exp Remove superfluous semicolons from testsuite throughout. 2013-06-07 17:31:09 +00:00
range-stepping.c range stepping: tests 2013-05-23 17:19:05 +00:00
range-stepping.exp Remove superfluous semicolons from testsuite throughout. 2013-06-07 17:31:09 +00:00
read-memory.c gdb/testsuite/ 2013-07-18 23:04:00 +00:00
read-memory.exp gdb/ 2013-07-18 23:09:49 +00:00
report.exp Remove superfluous semicolons from testsuite throughout. 2013-06-07 17:31:09 +00:00
save-trace.exp Remove superfluous semicolons from testsuite throughout. 2013-06-07 17:31:09 +00:00
stap-trace.c
stap-trace.exp gdb/testsuite/ 2013-03-14 13:34:06 +00:00
status-stop.c
status-stop.exp Remove superfluous semicolons from testsuite throughout. 2013-06-07 17:31:09 +00:00
strace.c
strace.exp Remove superfluous semicolons from testsuite throughout. 2013-06-07 17:31:09 +00:00
tfile.c gdb/testsuite/ 2013-04-03 03:43:54 +00:00
tfile.exp Remove superfluous semicolons from testsuite throughout. 2013-06-07 17:31:09 +00:00
tfind.exp Remove superfluous semicolons from testsuite throughout. 2013-06-07 17:31:09 +00:00
trace-break.c
trace-break.exp Remove superfluous semicolons from testsuite throughout. 2013-06-07 17:31:09 +00:00
trace-buffer-size.c 2012-03-08 Stan Shebs <stan@codesourcery.com> 2013-03-08 15:06:39 +00:00
trace-buffer-size.exp Accept "set foo unlimited" in integer/uinteger/zuinteger_unlimited commands. 2013-04-10 15:11:12 +00:00
trace-mt.c
trace-mt.exp Remove superfluous semicolons from testsuite throughout. 2013-06-07 17:31:09 +00:00
trace-unavailable.c Teach -data-list-register-values to not include unavailable registers 2013-06-20 00:39:11 +00:00
tracecmd.exp Remove superfluous semicolons from testsuite throughout. 2013-06-07 17:31:09 +00:00
tspeed.c
tspeed.exp Remove superfluous semicolons from testsuite throughout. 2013-06-07 17:31:09 +00:00
tstatus.exp gdb/ 2013-04-10 09:42:57 +00:00
tsv.exp Upload tsv earlier in remote_start_remote 2013-06-25 13:01:28 +00:00
unavailable.cc
unavailable.exp gdb/testsuite/ 2013-03-15 01:41:29 +00:00
while-dyn.exp gdb/testsuite/ 2013-03-14 13:34:06 +00:00
while-stepping.exp Remove superfluous semicolons from testsuite throughout. 2013-06-07 17:31:09 +00:00