binutils-gdb/gdb/python
Tom Tromey ff47f4f06d Fix valgrind error from gdb.decode_line
PR symtab/12535 points out that gdb.decode_line("") will cause a
valgrind report.

I think the empty linespec does not really make sense.  So, this patch
changes gdb.decode_line to treat a whitespace-only linespec the same
as a non-existing argument.

gdb/ChangeLog
2020-01-14  Tom Tromey  <tom@tromey.com>

	PR symtab/12535:
	* python/python.c (gdbpy_decode_line): Treat empty string the same
	as no argument.

gdb/testsuite/ChangeLog
2020-01-14  Tom Tromey  <tom@tromey.com>

	PR symtab/12535:
	* gdb.python/python.exp: Test decode_line with empty string
	argument.

Change-Id: I1d95812b4b7a21d69a3e9afd05b9e3141a931897
2020-01-14 17:57:52 -07:00
..
lib/gdb Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-all-events.def Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-arch.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-auto-load.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-block.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-bpevent.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-breakpoint.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-cmd.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-continueevent.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-event-types.def Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-event.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-event.h Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-events.h Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-evtregistry.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-evts.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-exitedevent.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-finishbreakpoint.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-frame.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-framefilter.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-function.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-gdb-readline.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-inferior.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-infevents.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-infthread.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-instruction.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-instruction.h Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-lazy-string.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-linetable.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-newobjfileevent.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-objfile.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-param.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-prettyprint.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-progspace.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-record-btrace.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-record-btrace.h Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-record-full.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-record-full.h Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-record.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-record.h Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-ref.h Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-signalevent.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-stopevent.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-stopevent.h Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-symbol.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-symtab.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-threadevent.c Multi-target support 2020-01-10 20:06:08 +00:00
py-type.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-unwind.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-utils.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-value.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-varobj.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
py-xmethods.c Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
python-config.py configure uses incorrect link order when testing libpython 2018-05-04 10:08:09 -04:00
python-internal.h Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
python.c Fix valgrind error from gdb.decode_line 2020-01-14 17:57:52 -07:00
python.h Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00