This is the mail archive of the insight@sources.redhat.com mailing list for the Insight 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: [RFA] quit patch


On Fri, 26 Apr 2002, Martin M. Hunt wrote:

> > Doesn't ManagedWin::shutdown search for all open windows to be reopened
> > when insight is restarted? Deleting SrcWins, then, won't get added to the
> > list?
>
> Yes they will because shutdown is being called from their destructor, so
> they are still there.

I don't understand. I don't see any calls to ManagedWin::shutdown in
SrcWin::destructor (or anywhere else but gdbtk_cleanup).

So what happens when the user quits? We call gdb_force_quit. This calls
gdb's gdb_force_quit which does all the final cleanups (in some
more-or-less) random order. One of these cleanups is ours, gdbtk_cleanup.

So at this point, all the SrcWin's are still open, in fact, there are no
changes yet in the gui's state yet (except, as you indicate, that there
are apparently now some bad interactions occuring during the cleanup via
hooks).

Now when gdbtk_cleanup is called in interface.tcl, we call Session::save,
set ::gdb_shutting_down, call ManagedWin::shutdown and finally save
preferences.

ManagedWin::shutdown is called to save off any open windows to the
active list (so that the can be re-opened next time).

In your scenario, it seems to me that if we close/destroy all the SrcWins
and then call gdb_force_quite (and gdbtk_cleanup), none of the SrcWins
will be around when ManagedWin::shutdown runs to figure out which ones to
reopen.

Am I missing something?

In either case, what happens when the user types "quit" at the console
prompt? gdbtk_force_quit won't be called then and the same problem arises,
doesn't it?

Ok, I admit it. I'm confused. Please help me understand.
Keith




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