This is the mail archive of the gdb-patches@sourceware.org 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]
Other format: [Raw text]

Re: [PATCH]: Replace deprecated_detach_hook by an observer in TUI


On 11/08/2012 07:12 AM, Stephane Carrez wrote:
> Hi!

Hello!  Great to see the TUI getting some more love.  :-)  I'm using it
all the time.

> The TUI is using several deprecated hooks.
> I've replaced deprecated_detach_hook by an inferior exit observer.

Thanks for looking at this.  The inferior exit observer is called
for all inferiors, so if you're e.g., stepping over a fork, we'll now
leave single-key mode spuriously.  Try e.g.,

./gdb ./testsuite/gdb.base/foll-fork -ex "set follow-fork child"

and stepping over the fork.

> It seems that after this patch is applied, the detach hook is no longer used.
> The patch does not remove it, let me know if you want me to do it.

For these deprecated hooks, it's IMO enough to check whether Insight is
still using them too.  If not, time to zap.

> When the inferior exits, the TUI must leave the SingleKey mode so
> that gdb's prompt is displayed (remaining in this mode while there is
> no inferior is confusing).

I don't tend to use SingleKey mode myself, but it seems to me that either:

 -  if this is confusing, then perhaps not leaving SingleKey on a
    breakpoint, catchpoint, signal, etc. is confusing too?
 -  or perhaps what you want to is drop SingleKey mode only when _all_
    inferiors are dead/gone?

GDB can do multi-inferior debugging nowadays.  :-)

> I've committed the attached patch.

-- 
Pedro Alves


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