From: Fernando Nasser <fnasser@redhat.com>
To: Steven Johnson <sjohnson@neurizon.net>
Cc: gdb@sources.redhat.com
Subject: Re: Post Hooks Broken!!! Fix Attached.
Date: Fri, 23 Feb 2001 05:45:00 -0000 [thread overview]
Message-ID: <3A9668CF.EF616BCE@redhat.com> (raw)
In-Reply-To: <3A95FCCB.5D18D45E@neurizon.net>
Steven Johnson wrote:
>
> Hi,
>
> I Tried to use a late CVS snapshot of GDB/Insight and found my Post Hook
> was broken.
>
> It seems that it has been broken since the CLI sub-directory was
> created,
Hi Steven,
It was before that. I went through the archives and it seems that it
was broken when the the 'if' statement that referred to PRE_HOOK was
changed to a 'switch' on "hook_type", with the CMD_{PRE,POST}_HOOK
enums.
I will check the patch in latter today, but this shows that we need a
test for this.
Can you send me a sequence of commands and expected responses that would
test if the post hook has been correctly installed and another one
showing that the pre hook has not been clobbered? I can use it to
create a dejagnu test for it.
Regards,
Fernando
it was a simple problem and the patch to fix it is attached.
> Defining a Post-Hook currently overwrites the standard pre command hook,
> In the definition code, I had to fix the setting of the pointers to the
> hook code which were erroneously setting the pre pointers instead of the
> post pointers.
>
> Steven.
>
> Patch Follows:
>
> ------------------------------------------------------------------------
> diff -C2 -r -b ../gdb_cvs/src/gdb/cli/cli-script.c src/gdb/cli/cli-script.c
> *** ../gdb_cvs/src/gdb/cli/cli-script.c Thu Feb 15 08:50:31 2001
> --- src/gdb/cli/cli-script.c Fri Feb 23 14:55:49 2001
> ***************
> *** 1166,1171 ****
> break;
> case CMD_POST_HOOK:
> ! hookc->hook_pre = newc; /* Target gets hooked. */
> ! newc->hookee_pre = hookc; /* We are marked as hooking target cmd. */
> break;
> default:
> --- 1166,1171 ----
> break;
> case CMD_POST_HOOK:
> ! hookc->hook_post = newc; /* Target gets hooked. */
> ! newc->hookee_post = hookc; /* We are marked as hooking target cmd. */
> break;
> default:
--
Fernando Nasser
Red Hat Canada Ltd. E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9
next prev parent reply other threads:[~2001-02-23 5:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-02-22 22:02 Steven Johnson
2001-02-23 5:45 ` Fernando Nasser [this message]
2001-02-25 21:11 ` Steven Johnson
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=3A9668CF.EF616BCE@redhat.com \
--to=fnasser@redhat.com \
--cc=gdb@sources.redhat.com \
--cc=sjohnson@neurizon.net \
/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