This is the mail archive of the
mailing list for the GDB project.
Post Hooks Broken!!! Fix Attached.
- To: gdb at sources dot redhat dot com
- Subject: Post Hooks Broken!!! Fix Attached.
- From: Steven Johnson <sjohnson at neurizon dot net>
- Date: Fri, 23 Feb 2001 16:01:47 +1000
- CC: Fernando Nasser <fnasser at redhat dot com>
- Organization: Neurizon Pty Ltd
I Tried to use a late CVS snapshot of GDB/Insight and found my Post Hook
It seems that it has been broken since the CLI sub-directory was
created, 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
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 ****
! hookc->hook_pre = newc; /* Target gets hooked. */
! newc->hookee_pre = hookc; /* We are marked as hooking target cmd. */
--- 1166,1171 ----
! hookc->hook_post = newc; /* Target gets hooked. */
! newc->hookee_post = hookc; /* We are marked as hooking target cmd. */