public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/17035] New: "show user" doesn't list user-defined commands that have empty bodies.
@ 2014-06-06 15:48 palves at redhat dot com
2014-06-06 15:49 ` [Bug gdb/17035] " palves at redhat dot com
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: palves at redhat dot com @ 2014-06-06 15:48 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=17035
Bug ID: 17035
Summary: "show user" doesn't list user-defined commands that
have empty bodies.
Product: gdb
Version: HEAD
Status: NEW
Severity: normal
Priority: P2
Component: gdb
Assignee: unassigned at sourceware dot org
Reporter: palves at redhat dot com
Note how "foo" below isn't listed by "show user", while "bar" is:
(gdb) define foo
Type commands for definition of "foo".
End with a line saying just "end".
>end
(gdb) show user
(gdb)
(gdb) define bar
Type commands for definition of "bar".
End with a line saying just "end".
>asdf
>end
(gdb) show user
User command "bar":
asdf
(gdb)
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug gdb/17035] "show user" doesn't list user-defined commands that have empty bodies.
2014-06-06 15:48 [Bug gdb/17035] New: "show user" doesn't list user-defined commands that have empty bodies palves at redhat dot com
@ 2014-06-06 15:49 ` palves at redhat dot com
2014-09-07 23:16 ` cvs-commit at gcc dot gnu.org
2014-09-08 0:59 ` gabriel at krisman dot be
2 siblings, 0 replies; 4+ messages in thread
From: palves at redhat dot com @ 2014-06-06 15:49 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=17035
--- Comment #1 from Pedro Alves <palves at redhat dot com> ---
BTW, the empty command does get defined and is callable:
(gdb) foo
(gdb)
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug gdb/17035] "show user" doesn't list user-defined commands that have empty bodies.
2014-06-06 15:48 [Bug gdb/17035] New: "show user" doesn't list user-defined commands that have empty bodies palves at redhat dot com
2014-06-06 15:49 ` [Bug gdb/17035] " palves at redhat dot com
@ 2014-09-07 23:16 ` cvs-commit at gcc dot gnu.org
2014-09-08 0:59 ` gabriel at krisman dot be
2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2014-09-07 23:16 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=17035
--- Comment #2 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gdb and binutils".
The branch, master has been updated
via a9f116cbf2fb9892ddbc46478b85ebfa99b0074f (commit)
from c75bd3a23915c3122070a95e1974e323543ffbe4 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=a9f116cbf2fb9892ddbc46478b85ebfa99b0074f
commit a9f116cbf2fb9892ddbc46478b85ebfa99b0074f
Author: Gabriel Krisman Bertazi <gabriel@krisman.be>
Date: Sun Sep 7 20:12:19 2014 -0300
Fix PR gdb/17035: "show user" doesn't list user-defined commands that
have empty bodies.
User-defined commands that have empty bodies weren't being shown because
the print function returned too soon. Now, it prints the command's name
before checking if it has any body at all. This also fixes the same
problem on "show user <myemptycommand>", which wasn't being printed due
to a similar reason.
gdb/Changelog:
* cli/cli-cmds.c (show_user): Use cli_user_command_p to
decide whether we display the command on "show user".
* cli/cli-script.c (show_user_1): Only verify cmdlines after
printing command name.
* cli/cli-decode.h (cli_user_command_p): Declare new function.
* cli/cli-decode.c (cli_user_command_p): Create helper function
to verify whether cmd_list_element is a user-defined command.
gdb/testsuite/Changelog:
* gdb.base/commands.exp: Add tests to verify user-defined
commands with empty bodies.
* gdb.python/py-cmd.exp: Test that we don't show user-defined
python commands in `show user command`.
* gdb.python/scm-cmd.exp: Test that we don't show user-defined
scheme commands in `show user command`.
-----------------------------------------------------------------------
Summary of changes:
gdb/ChangeLog | 11 +++++++++++
gdb/cli/cli-cmds.c | 5 ++---
gdb/cli/cli-decode.c | 7 +++++++
gdb/cli/cli-decode.h | 5 +++++
gdb/cli/cli-script.c | 4 ++--
gdb/testsuite/ChangeLog | 10 ++++++++++
gdb/testsuite/gdb.base/commands.exp | 22 ++++++++++++++++++++++
gdb/testsuite/gdb.guile/scm-cmd.exp | 4 ++++
gdb/testsuite/gdb.python/py-cmd.exp | 4 ++++
9 files changed, 67 insertions(+), 5 deletions(-)
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug gdb/17035] "show user" doesn't list user-defined commands that have empty bodies.
2014-06-06 15:48 [Bug gdb/17035] New: "show user" doesn't list user-defined commands that have empty bodies palves at redhat dot com
2014-06-06 15:49 ` [Bug gdb/17035] " palves at redhat dot com
2014-09-07 23:16 ` cvs-commit at gcc dot gnu.org
@ 2014-09-08 0:59 ` gabriel at krisman dot be
2 siblings, 0 replies; 4+ messages in thread
From: gabriel at krisman dot be @ 2014-09-08 0:59 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=17035
krisman <gabriel at krisman dot be> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |gabriel at krisman dot be
Resolution|--- |FIXED
--- Comment #3 from krisman <gabriel at krisman dot be> ---
Resolved by <https://sourceware.org/ml/gdb-cvs/2014-09/msg00021.html>.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-09-08 0:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-06 15:48 [Bug gdb/17035] New: "show user" doesn't list user-defined commands that have empty bodies palves at redhat dot com
2014-06-06 15:49 ` [Bug gdb/17035] " palves at redhat dot com
2014-09-07 23:16 ` cvs-commit at gcc dot gnu.org
2014-09-08 0:59 ` gabriel at krisman dot be
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).