public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* question about target.to_stratum
@ 2003-05-05 19:09 Liang, James
  2003-05-11 15:35 ` Andrew Cagney
  0 siblings, 1 reply; 2+ messages in thread
From: Liang, James @ 2003-05-05 19:09 UTC (permalink / raw)
  To: 'gdb@sources.redhat.com'

What is the meaning and use of to_stratum?  What is it used to represent?

I noticed that the push_target function in target.c closes existing targets
of the same stratum.  If my user types
target <bla> after starting up, this always causes it to close the target
that I am trying to push because they both have the same stratum.

I looked at the way exec does it, and I can tell that it changes the stratum
to dummy before calling push again, but I don't see where.  How does this
work?


James

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: question about target.to_stratum
  2003-05-05 19:09 question about target.to_stratum Liang, James
@ 2003-05-11 15:35 ` Andrew Cagney
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Cagney @ 2003-05-11 15:35 UTC (permalink / raw)
  To: Liang, James; +Cc: 'gdb@sources.redhat.com'

> What is the meaning and use of to_stratum?  What is it used to represent?

The idea was that the target was made up of a number of layers and the 
user could move between them.  For instance:

- threads
- core file
- the executable file

If gdb needed to read the target's memory, it was able to work its way 
down the stratum until it found one that could furnish the request.  A 
read of the text segment, in the above, would end up being handled by 
the executable/file stratum.

The benefit was that the user could change stratum layers (e.g., replace 
"core file" with "live process") and consequently switch between 
conceptual targets (did that make sense?).

It turned out though, that things are more complicated than this. 
Instead of a few simple layers a directed graph is involved vis:

     .-< core file <- thread layer
    /
exe
    \
     `-< live process <- thread layer

Unfortunatly, the current target infrastructure isn't up to this.  GDB 
needs to instead allow multiple active targets.  Allowing multiple 
active threads, targets, and address spaces are all on the "things to do 
today list" ...  On a bright note, frames, register cache and 
architecture were also all once on that list.

> I noticed that the push_target function in target.c closes existing targets
> of the same stratum.  If my user types
> target <bla> after starting up, this always causes it to close the target
> that I am trying to push because they both have the same stratum.



> I looked at the way exec does it, and I can tell that it changes the stratum
> to dummy before calling push again, but I don't see where.  How does this
> work?

That I don't know.

Andrew



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-05-11 15:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-05 19:09 question about target.to_stratum Liang, James
2003-05-11 15:35 ` Andrew Cagney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).