From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steven Johnson To: Fernando Nasser Cc: gdb@sources.redhat.com Subject: Re: Post Hooks Broken!!! Fix Attached. Date: Sun, 25 Feb 2001 21:11:00 -0000 Message-id: <3A99E57C.85A8A3C1@neurizon.net> References: <3A95FCCB.5D18D45E@neurizon.net> <3A9668CF.EF616BCE@redhat.com> X-SW-Source: 2001-02/msg00350.html 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