diff options
author | Sergio Durigan Junior <sergiodj@redhat.com> | 2017-06-30 08:27:29 -0400 |
---|---|---|
committer | Sergio Durigan Junior <sergiodj@redhat.com> | 2017-06-30 09:31:21 -0400 |
commit | dc4bde35d16df749e529229657b3468417937cfc (patch) | |
tree | 9c8ef1f1ac11054bb17626342d5b01fd9c233639 /gdb/testsuite/ChangeLog | |
parent | 51ed89aa0dce3db46561235efdc4bbc0661bcf37 (diff) | |
download | gdb-dc4bde35d16df749e529229657b3468417937cfc.zip gdb-dc4bde35d16df749e529229657b3468417937cfc.tar.gz gdb-dc4bde35d16df749e529229657b3468417937cfc.tar.bz2 |
PR cli/21688: Detect aliases when issuing python/compile/guile commands (and fix last commit)
My last commit fixed a regression that happened when using
inline/multi-line commands for Python/Compile/Guile, but introduced
another regression: it is now not possible to use aliases for the
commands mentioned above. The fix is to almost revert the change I've
made and go back to using the 'struct cmd_list_element *', but at the
same time make sure that we advance the 'cmd_name' variable past all
the whitespace characters after the command name. If, after skipping
the whitespace, we encounter a '\0', it means that the command is not
inline. Otherwise, it is.
This patch also expands the testcase in order to check for aliases and
for trailing whitespace after the command name.
gdb/ChangeLog:
2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
Pedro Alves <palves@redhat.com>
PR cli/21688
* cli/cli-script.c (command_name_equals_not_inline): Remove function.
(process_next_line): New variable 'inline_cmd'.
Adjust 'if' clauses for "python", "compile" and "guile" to use
'command_name_equals' and check for '!inline_cmd'.
gdb/testsuite/ChangeLog:
2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
PR cli/21688
* gdb.python/py-cmd.exp (test_python_inline_or_multiline): Add new
tests for alias commands and trailing whitespace.
Diffstat (limited to 'gdb/testsuite/ChangeLog')
-rw-r--r-- | gdb/testsuite/ChangeLog | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 06bf5a4..6160c4b 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,6 +1,12 @@ 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com> PR cli/21688 + * gdb.python/py-cmd.exp (test_python_inline_or_multiline): Add new + tests for alias commands and trailing whitespace. + +2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com> + + PR cli/21688 * gdb.python/py-cmd.exp (test_python_inline_or_multiline): New procedure. Call it. |