This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug cli/21688] `python` command ignores argument when invoked inside `if` clause
- From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Fri, 30 Jun 2017 13:51:14 +0000
- Subject: [Bug cli/21688] `python` command ignores argument when invoked inside `if` clause
- Auto-submitted: auto-generated
- References: <bug-21688-4717@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=21688
--- Comment #7 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Sergio Durigan Junior
<sergiodj@sourceware.org>:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=dc4bde35d16df749e529229657b3468417937cfc
commit dc4bde35d16df749e529229657b3468417937cfc
Author: Sergio Durigan Junior <sergiodj@redhat.com>
Date: Fri Jun 30 08:27:29 2017 -0400
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.
--
You are receiving this mail because:
You are on the CC list for the bug.