This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Post Hooks Broken!!! Fix Attached.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]