Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@cygnus.com>
To: Jim Ingham <jingham@apple.com>
Cc: gdb@sources.redhat.com
Subject: Re: [multi-arch] The frame as the global parameter (long, important)
Date: Mon, 26 Feb 2001 16:28:00 -0000	[thread overview]
Message-ID: <3A9AF421.A0D723D0@cygnus.com> (raw)
In-Reply-To: <200102262251.OAA17343@scv1.apple.com>

> So, yeah, it seems like this should work, provided you make sure you 
> don't assume that there is only one valid result of a backtrace, and 
> make switching the order fairly easy...

Hmm, GDB currently assumes that, given a frame, there is only one
possible next frame.  I'll be leaving that assumption alone :-)

> > At a more wishy/washy level.  Have you considered viewing GDB as:
> >
> >       gdb
> >         \
> >        context - java
> >           \
> >           frame
> >             \
> >            target
> >               \
> >               gdb - hardware
> >                 \
> >                 ....
> >
> > That is, a target that allows the debugging of the JVM might be
> > implemented using an GDB instance that understands how to access the raw
> > data.
> 
> Not sure how you mean this.  One thing to note is that the JVM context
> only understands some bits of the stack.  The native implemented methods
> are unknown to it.  OTOH, being able to trace from the Java side INTO
> the native side is the whole point of doing this.  There are already
> good Java debugging tools.  What I really want this for is when my
> native method goes awry, I want to be able to view the Java context in
> which my C code is running.  Seems like this maps naturally onto
> reconstructing the program stack in this mixed context.

Hmm, we're thinking of different approaches - this is good.

I was thinking that the JVM might be re-constructed by using an instance
of GDB (yes several in the one program) grub around in the JVM
interpreter's (written in C?) data structures.

For instance (and I'm totally making this up cause I know nothing about
a JVM :-), say the JVM's address space is implemented using a hash table
called jvm_memory[].  The target could use ``gdb - hardware'' to find
``jvm_memory[]'' and do the hash operation.

Another example might be trying to debug a unix environment given a jtag
interface.  There would be two layers.

	gdb-unix
	    |
	unix-target
	    +
	gdb-hardware
	    |
	hardware-target

the unix-target would re-construct things like VM and process tables
using the gdb able to control the hardware target.

	Andrew

PS: It has been suggested that the entire upper layer of both these
examples should be written in a scripting language .....


  reply	other threads:[~2001-02-26 16:28 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <983058218.3463.ezmlm@sources.redhat.com>
2001-02-26 10:17 ` Jim Ingham
2001-02-26 13:16   ` Nick Duffek
2001-02-26 13:27     ` Jim Ingham
2001-02-26 13:28     ` Per Bothner
2001-02-26 13:50   ` Andrew Cagney
2001-02-26 14:52     ` Jim Ingham
2001-02-26 16:28       ` Andrew Cagney [this message]
2001-02-26 18:14         ` Jim Ingham
2001-02-23 16:34 Andrew Cagney
2001-02-26 13:12 ` Nick Duffek
2001-02-26 13:53   ` Kevin Buettner
2001-02-26 15:27     ` Nick Duffek
2001-02-26 15:55       ` Kevin Buettner
2001-02-26 14:42   ` Andrew Cagney
2001-02-26 13:44 ` Kevin Buettner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3A9AF421.A0D723D0@cygnus.com \
    --to=ac131313@cygnus.com \
    --cc=gdb@sources.redhat.com \
    --cc=jingham@apple.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox