This is the mail archive of the
insight@sources.redhat.com
mailing list for the Insight project.
Re: Insight session regression (?)
- To: Tom Tromey <tromey at redhat dot com>
- Subject: Re: Insight session regression (?)
- From: Keith Seitz <keiths at cygnus dot com>
- Date: Wed, 3 Oct 2001 14:03:43 -0700 (PDT)
- cc: Insight List <insight at sourceware dot cygnus dot com>
WARNING: stream of conciousness follows
On 28 Sep 2001, Tom Tromey wrote:
> >>>>> "Fernando" == Fernando Nasser <fnasser@cygnus.com> writes:
> My patch circumvents saving the session in this case, and then changes
> the preloop to load a session if one exists. I removed some code from
> the preloop which seemed redundant (and which caused the source window
> to flash from source, to nothing, to source again on startup).
>
> Is this ok? Or is there a better way to do it?
I hate to say this, but your approach is completely different from the one
I would have guessed to try, so now I have to ask if you've tried my
approach and found it lacking. :-)
All file loads run through several hooks in gdb-land. These are listed in
interface.tcl: exec_file_display_hook, file_changed_hook, etc.
gdbtk_tcl_exec_file_display will create a new session for any loaded
executable, and I think this thinko may be the reason one can get multiple
sessions for the same exe. We should try to LOAD the session here, and
only if we could not find a session should we create a new one.
These file hooks are awefully confusing, but one need only remember that
file_command=exec_file_command+add_symbol_file_command. Of course this
leads to another problem: we cannot set breakpoints and the like until
AFTER symbol reading, so we're stuck with a global again! Argh.
I dunno. Now I have to think about it some more. I'm inclined to put it
all in file hooks, but as we've discovered, we need to wait until gdb is
done loading everything.
We could put it in the file_changed_hook, since that is called AFTER
reading the exe and symbols. Problem with this, though, is that it only
gets called IF the user used "file" at the prompt (or passed a file to
gdb's command line). We lose if the user uses "exec-file" and
"add-symbol-file". But then, we'd be in no worse shape than we are now,
would we?
Ok, maybe we should just put it in gdbtk_file_changed? (Wow, what a
rambling!)
Keith