[RFC] Inferior stop events

Keith Seitz keiths@cygnus.com
Thu Jun 14 08:13:00 GMT 2001


On Thu, 14 Jun 2001, Eli Zaretskii wrote:

> For the benefit of the GUI-challenged people such as myself: how, if at
> all, is this done now?  That is, what does a typical UI for GDB do to
> tell the user why did the debuggee stopped?

I can only speak for Insight. We use the call_command_hook, and we assume
that the target will run if the command's class is class_run or
class_trace.

Before calling the actual function bound to the command, we run a script
to tell the rest of the UI that we are about to be "busy". When the
command is done (and the function returns), we tell the UI that it is
idle. This tells us that gdb is no longer using the inferior, but it does
not tell us what happened. Did it exit? Hit a breakpoint? Take a signal?

Mind you, some of these things we can sort of figure out. For example,
when the inferior gets a signal, we have a hook which runs in the global
context. At one time, we attempted to parse the output of "info targ". All
kinds of nasty things. IMO this is much cleaner.

Hope this helps.
Keith




More information about the Gdb mailing list