old-cross-binutils/gdb/testsuite
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
..
boards * boards/fission.exp: Add -fdebug-types-section to debug_flags. 2013-08-14 20:39:32 +00:00
config Remove superfluous semicolons from testsuite throughout. 2013-06-07 17:31:09 +00:00
gdb.ada simple test suite fix in gdb.ada 2013-07-16 18:52:18 +00:00
gdb.arch fix gdb.arch to be parallel-safe 2013-08-22 13:54:15 +00:00
gdb.asm Remove superfluous semicolons from testsuite throughout. 2013-06-07 17:31:09 +00:00
gdb.base * lib/gdb.exp (run_on_host): Moved here from gnu-debugdata.exp. 2013-08-26 18:30:02 +00:00
gdb.btrace record-btrace: fix assertion when enabling recording after re-run 2013-03-26 07:15:09 +00:00
gdb.cell Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
gdb.cp Remove superfluous semicolons from testsuite throughout. 2013-06-07 17:31:09 +00:00
gdb.disasm Remove superfluous semicolons from testsuite throughout. 2013-06-07 17:31:09 +00:00
gdb.dwarf2 PR symtab/15885 2013-08-26 18:43:40 +00:00
gdb.fortran Update years in copyright notice for the GDB files. 2013-01-01 06:41:43 +00:00
gdb.gdb fix python-selftest.exp failure with gdbserver 2013-06-18 14:12:09 +00:00
gdb.go Update years in copyright notice for the GDB files. 2013-01-01 06:41:43 +00:00
gdb.hp Remove superfluous semicolons from testsuite throughout. 2013-06-07 17:31:09 +00:00
gdb.java Fix formating in copyright headers. 2013-06-07 14:39:33 +00:00
gdb.linespec gdb/ 2013-05-07 17:04:29 +00:00
gdb.mi * gdb.mi/mi-var-child-f.exp: Pass f90 to gdb_compile instead 2013-07-26 18:15:07 +00:00
gdb.modula2 Update years in copyright notice for the GDB files. 2013-01-01 06:41:43 +00:00
gdb.multi Update years in copyright notice for the GDB files. 2013-01-01 06:41:43 +00:00
gdb.objc Update years in copyright notice for the GDB files. 2013-01-01 06:41:43 +00:00
gdb.opencl Update years in copyright notice for the GDB files. 2013-01-01 06:41:43 +00:00
gdb.opt Update years in copyright notice for the GDB files. 2013-01-01 06:41:43 +00:00
gdb.pascal Remove superfluous semicolons from testsuite throughout. 2013-06-07 17:31:09 +00:00
gdb.python fix gdb.python to be parallel-safe 2013-08-22 13:51:08 +00:00
gdb.reverse * gdb.reverse/shr.h: New file. 2013-05-06 22:07:13 +00:00
gdb.server Upload tsv earlier in remote_start_remote 2013-06-25 13:01:28 +00:00
gdb.stabs Update years in copyright notice for the GDB files. 2013-01-01 06:41:43 +00:00
gdb.threads gdb/testsuite/gdb.threads: Ensure TLS tests link against pthreads. 2013-07-18 15:49:22 +00:00
gdb.trace Add options to skip unavailable locals 2013-08-27 05:20:57 +00:00
gdb.xml 2013-05-06 Sandra Loosemore <sandra@codesourcery.com> 2013-05-07 01:12:41 +00:00
lib gdb/testsuite/ 2013-08-27 00:19:02 +00:00
aclocal.m4
ChangeLog Add options to skip unavailable locals 2013-08-27 05:20:57 +00:00
configure Add tests for the new record-btrace target. 2013-03-11 08:59:00 +00:00
configure.ac Add tests for the new record-btrace target. 2013-03-11 08:59:00 +00:00
dg-extract-results.sh Merge dg-extract-results.sh from gcc upstream (svn 195224). 2013-01-17 14:31:11 +00:00
Makefile.in * Makefile.in (ALL_SUBDIRS): Add gdb.go. 2013-08-12 20:54:06 +00:00
TODO