binutils-gdb/gdb/testsuite/gdb.python
Luis Machado 4dac951e11 Fixup gdb.python/py-value.exp for bare-metal aarch64-elf
I noticed that testing aarch64-elf gdb with a physical board
ran into issues with gdb.python/py-value.exp. Further investigation showed
that we were actually trying to dereference a NULL pointer (argv) when trying
to access argv[0].

Being bare-metal, argv is not guaranteed to be valid. So we need to make sure
argv is sane before accessing argv[0].

The following patch fixes up the test program to check for a NULL argv and also
improves the testcase a bit so it doesn't have to work with a hardcoded argc
value.

Regression-tested on x86-64 Ubuntu 16.04.

gdb/testsuite/ChangeLog:

2016-10-12  Luis Machado  <lgustavo@codesourcery.com>

	* gdb.python/py-value.c (main): Check if argv is NULL before using it.
	* gdb.python/py-value.exp (test_value_in_inferior): Don't use hardcoded
	argc values.
	Add 1 to argc so we guarantee distinct initial/modified argc values.
2016-10-12 10:10:03 -05:00
..
amd64-py-framefilter-invalidarg.S GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
lib-types.cc GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
lib-types.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-arch.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-arch.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-as-string.c Add $_as_string convenience function 2016-03-10 17:12:30 -05:00
py-as-string.exp Add $_as_string convenience function 2016-03-10 17:12:30 -05:00
py-bad-printers.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-bad-printers.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-bad-printers.py GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-block.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-block.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-breakpoint-create-fail.c Fix use of a dangling pointer for Python breakpoint objects 2016-06-27 12:11:25 +02:00
py-breakpoint-create-fail.exp Fix use of a dangling pointer for Python breakpoint objects 2016-06-27 12:11:25 +02:00
py-breakpoint-create-fail.py Fix use of a dangling pointer for Python breakpoint objects 2016-06-27 12:11:25 +02:00
py-breakpoint.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-breakpoint.exp PR python/15620, PR python/18620 - breakpoint events in Python 2016-07-13 13:59:55 -06:00
py-caller-is.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-caller-is.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-cmd.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-cmd.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-completion.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-completion.py GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-error.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-error.py GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-events-shlib.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-events.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-events.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-events.py GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-evsignal.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-evthreads.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-evthreads.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-explore-cc.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-explore.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-explore.cc GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-explore.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-finish-breakpoint.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-finish-breakpoint.exp Rename gdb_load_shlibs to gdb_load_shlib 2016-04-27 18:09:14 -04:00
py-finish-breakpoint.py GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-finish-breakpoint2.cc GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-finish-breakpoint2.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-finish-breakpoint2.py GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-frame-args.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-frame-args.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-frame-args.py GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-frame-inline.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-frame-inline.exp PR python/18565 - make Frame.function work for inline frames 2016-08-03 09:04:08 -06:00
py-frame.c
py-frame.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-framefilter-gdb.py.in GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-framefilter-invalidarg-gdb.py.in GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-framefilter-invalidarg.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-framefilter-invalidarg.py GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-framefilter-mi.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-framefilter-mi.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-framefilter.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-framefilter.exp Fix PR python/20129 - use of non-existing variable 2016-06-29 10:18:38 -06:00
py-framefilter.py GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-function.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-inferior.c gdb/ 2012-07-26 19:09:35 +00:00
py-inferior.exp Reapply: List inferiors/threads/pspaces in ascending order 2016-01-12 01:12:38 +00:00
py-infthread.c
py-infthread.exp Add Python InferiorThread.global_num attribute 2016-01-13 11:00:54 +00:00
py-lazy-string.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-lazy-string.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-linetable.S GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-linetable.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-linetable.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-lookup-type.exp Remove Java support 2016-10-06 10:10:40 -06:00
py-mi-events-gdb.py Prepare gdb.python/mi-py-events.exp for Python/MI in separate channels 2016-06-21 01:11:43 +01:00
py-mi-events.c python: Use console format for output of gdb.execute command 2016-03-31 15:32:38 +03:00
py-mi-events.exp Prepare gdb.python/mi-py-events.exp for Python/MI in separate channels 2016-06-21 01:11:43 +01:00
py-mi-objfile-gdb.py testsuite: Update py-mi-objfile to expect console format print 2016-04-06 09:39:16 +03:00
py-mi-objfile.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-mi-objfile.exp testsuite: Update py-mi-objfile to expect console format print 2016-04-06 09:39:16 +03:00
py-mi.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-objfile-script-gdb.py GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-objfile-script.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-objfile-script.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-objfile.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-objfile.exp Fix PR python/19438, PR python/18393 - initialize dictionaries 2016-05-23 10:08:34 -06:00
py-parameter.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-pp-integral.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-pp-integral.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-pp-integral.py GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-pp-maint.c Fix sorting of enum values in FlagEnumerationPrinter 2016-01-20 13:44:33 -05:00
py-pp-maint.exp Fix sorting of enum values in FlagEnumerationPrinter 2016-01-20 13:44:33 -05:00
py-pp-maint.py GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-pp-re-notag.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-pp-re-notag.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-pp-re-notag.py GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-pp-registration.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-pp-registration.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-pp-registration.py GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-prettyprint.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-prettyprint.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-prettyprint.py GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-progspace.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-progspace.exp Fix PR python/19438, PR python/18393 - initialize dictionaries 2016-05-23 10:08:34 -06:00
py-prompt.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-prompt.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-recurse-unwind.c Test case to detect recursive unwinding in Python-based unwinders. 2016-08-24 14:22:30 -07:00
py-recurse-unwind.exp Fix PR19927: Avoid unwinder recursion if sniffer uses calls parse_and_eval 2016-09-05 18:41:38 +01:00
py-recurse-unwind.py Test case to detect recursive unwinding in Python-based unwinders. 2016-08-24 14:22:30 -07:00
py-section-script.c [testsuite] @progbits -> %progbits 2016-01-18 14:30:23 +00:00
py-section-script.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-section-script.py GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-shared-sl.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-shared.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-shared.exp Fix PR python/18984 2016-06-02 13:18:42 -06:00
py-strfns.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-strfns.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-symbol.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-symbol.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-symtab.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-sync-interp.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-sync-interp.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-template.cc GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-template.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-type.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-type.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-typeprint.cc GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-typeprint.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-typeprint.py GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-unwind-maint.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-unwind-maint.exp Fix PR19927: Avoid unwinder recursion if sniffer uses calls parse_and_eval 2016-09-05 18:41:38 +01:00
py-unwind-maint.py GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-unwind.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-unwind.exp testsuite patch: Skip py-unwind.exp on x86_64 -m32 2016-07-20 16:17:04 +02:00
py-unwind.py GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-value-cc.cc GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-value-cc.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-value.c Fixup gdb.python/py-value.exp for bare-metal aarch64-elf 2016-10-12 10:10:03 -05:00
py-value.exp Fixup gdb.python/py-value.exp for bare-metal aarch64-elf 2016-10-12 10:10:03 -05:00
py-xmethods.cc GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-xmethods.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
py-xmethods.py GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
python-1.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
python.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
python.exp python: accept address and explicit locations in gdb.decode_line 2016-10-07 09:02:56 +02:00
source1 GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
source2.py GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00