This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

src/gdb ChangeLog NEWS valprint.c valprint.h v ...


CVSROOT:	/cvs/src
Module name:	src
Changes by:	qiyao@sourceware.org	2013-08-27 05:20:57

Modified files:
	gdb            : ChangeLog NEWS valprint.c valprint.h value.c 
	                 value.h 
	gdb/doc        : ChangeLog gdb.texinfo 
	gdb/mi         : mi-cmd-stack.c 
	gdb/testsuite  : ChangeLog 
	gdb/testsuite/gdb.trace: entry-values.exp 
	                         mi-trace-unavailable.exp 

Log message:
	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'.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.15932&r2=1.15933
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/NEWS.diff?cvsroot=src&r1=1.610&r2=1.611
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/valprint.c.diff?cvsroot=src&r1=1.138&r2=1.139
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/valprint.h.diff?cvsroot=src&r1=1.48&r2=1.49
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/value.c.diff?cvsroot=src&r1=1.179&r2=1.180
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/value.h.diff?cvsroot=src&r1=1.224&r2=1.225
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/doc/ChangeLog.diff?cvsroot=src&r1=1.1482&r2=1.1483
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/doc/gdb.texinfo.diff?cvsroot=src&r1=1.1104&r2=1.1105
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/mi/mi-cmd-stack.c.diff?cvsroot=src&r1=1.75&r2=1.76
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/ChangeLog.diff?cvsroot=src&r1=1.3787&r2=1.3788
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.trace/entry-values.exp.diff?cvsroot=src&r1=1.2&r2=1.3
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.trace/mi-trace-unavailable.exp.diff?cvsroot=src&r1=1.3&r2=1.4


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]