This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Command Hooks (Post rather than Pre)
- To: gdb at sourceware dot cygnus dot com
- Subject: Re: Command Hooks (Post rather than Pre)
- From: Steven Johnson <sbjohnson at ozemail dot com dot au>
- Date: Tue, 15 Aug 2000 17:18:37 +1000
- References: <3998AA1F.9353BD64@ozemail.com.au>
After some investigation, I can answer one of my own questions :
Does a command recurse if it is called from it's hook?
Answer : Yes.
Do Bad things happen:
Answer : Yes. (Unless one considers a segmentation fault a good thing)
The Patch I have will also prevent this from happening, so that for example,
you can write the following:
define hook-echo
echo PRE HOOK Running\n
end
define hookpost-echo
echo POST HOOK Running\n
end
when you then execute:
gdb>echo hello world\n
you get:
PRE HOOK Running
hello world
POST HOOK Running
This is what my patch will now allow. Anyway as I said, im fishing for
comments on this before I submit it.
Steven Johnson