This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Post Hooks Broken!!! Fix Attached.
- To: Fernando Nasser <fnasser at redhat dot com>
- Subject: Re: Post Hooks Broken!!! Fix Attached.
- From: Steven Johnson <sjohnson at neurizon dot net>
- Date: Mon, 26 Feb 2001 15:11:24 +1000
- CC: gdb at sources dot redhat dot com
- Organization: Neurizon Pty Ltd
- References: <3A95FCCB.5D18D45E@neurizon.net> <3A9668CF.EF616BCE@redhat.com>
Hi Fernando,
Fernando Nasser wrote:
>
> 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.
>
Doesn't surprise me, I hadn't done anything with GDB for a while.
> 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.
Here it is:
(gdb)echo hooked
hooked
(gdb)define hook-echo
>echo before
>end
(gdb)echo hooked
beforehooked
(gdb)define hookpost-echo
>echo after
>end
(gdb)echo hooked
beforehookedafter
(gdb)define hook-echo
>end
(gdb)echo hooked
hookedafter
(gdb)define hookpost-echo
>end
(gdb)echo hooked
hooked
(gdb)
I hope this is what you were looking for? I used echo, because I
thought it would be easy to test with it on every platform. Obviously
there are a few permutations of this but Im not sure they are worth
checking individually.
Regards,
Steven Johnson