Fix valgrind error from gdb.decode_line
authorTom Tromey <tom@tromey.com>
Sat, 21 Dec 2019 16:51:05 +0000 (09:51 -0700)
committerTom Tromey <tom@tromey.com>
Wed, 15 Jan 2020 00:57:52 +0000 (17:57 -0700)
commitff47f4f06d296b672337e2c7363a745cd2725f58
tree9a60eb2433cffbcbfab90243b5fe2744a8e8cd76
parentb300843444cf833f7b3943ebae060c3d88b4ce91
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
gdb/ChangeLog
gdb/python/python.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.python/python.exp
This page took 0.025291 seconds and 4 git commands to generate.