public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: brobecker@gnat.com
To: gdb-gnats@sources.redhat.com
Subject: cli/2563: redefining command causes hooks to be lost
Date: Tue, 09 Dec 2008 10:48:00 -0000	[thread overview]
Message-ID: <20081209104359.12452.qmail@sourceware.org> (raw)


>Number:         2563
>Category:       cli
>Synopsis:       redefining command causes hooks to be lost
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Dec 09 10:48:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Joel Brobecker
>Release:        6.8 (reproduced with 6.8.50.20081205-cvs)
>Organization:
>Environment:

>Description:
When redefining a command that has a hook attached to it, the new command is missing the hook.  For instance, consider the following:

(gdb) define cmd
Type commands for definition of "cmd".
End with a line saying just "end".
> echo cmd\n
> end
(gdb) define hook-cmd
Type commands for definition of "hook-cmd".
End with a line saying just "end".
> echo hook-cmd\n
> end

Calling our new "cmd" causes "hook-cmd" to be called as well:

(gdb) cmd
hook-cmd
cmd

Now, if we redefine "cmd":

(gdb) define cmd
Redefine command "cmd"? (y or n) y
Type commands for definition of "cmd".
End with a line saying just "end".
> echo cmd2\n
> end

Then calling "cmd" again shows that "hook-cmd" is no longer called:

(gdb) cmd
cmd2

>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


             reply	other threads:[~2008-12-09 10:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-09 10:48 brobecker [this message]
2008-12-10 22:29 tromey
2008-12-12 18:00 tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081209104359.12452.qmail@sourceware.org \
    --to=brobecker@gnat.com \
    --cc=gdb-gnats@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).