This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug python/21688] `python` command ignores argument when invoked inside `if` clause
- From: "sergiodj at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Wed, 28 Jun 2017 20:54:53 +0000
- Subject: [Bug python/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 #2 from Sergio Durigan Junior <sergiodj at redhat dot com> ---
604c4576fdcfc4e7c28f569b3748a1b6b4e0dbd4 is the first bad commit
commit 604c4576fdcfc4e7c28f569b3748a1b6b4e0dbd4
Author: Jerome Guitton <guitton@adacore.com>
Date: Tue Jan 10 15:15:53 2017 +0100
Command abbreviation in define
When defining a new macro, "command" is not recognized as an alias for
"commands":
(gdb) define breakmain
Type commands for definition of "breakmain".
End with a line saying just "end".
>break main
>command
>echo "IN MAIN\n"
>end
(gdb)
There is a special case for while-stepping, where 'ws' and 'stepping' are
recognized explicitely. Instead of adding more special cases, this change
uses cli-decode.
gdb/ChangeLog:
* cli/cli-decode.c (find_command_name_length): Make it extern.
* cli/cli-decode.h (find_command_name_length): Declare.
* cli/cli-script.c (command_name_equals, line_first_arg):
New functions.
(process_next_line): Use cli-decode to parse command names.
(build_command_line): Make args a constant pointer.
gdb/testsuite/ChangeLog:
* gdb.base/define.exp: Add test for command abbreviations
in define.
--
You are receiving this mail because:
You are on the CC list for the bug.