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: Command Hooks (Post rather than Pre)


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

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