This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
RE: GDB for multiple targets
- From: "Marc Khouzam" <marc dot khouzam at ericsson dot com>
- To: "Ulrich Weigand" <uweigand at de dot ibm dot com>, "Michael Snyder" <msnyder at vmware dot com>
- Cc: <gdb at sourceware dot org>
- Date: Tue, 9 Dec 2008 09:41:51 -0500
- Subject: RE: GDB for multiple targets
- References: <492706B3.9040907@vmware.com> from "Michael Snyder" at Nov 21, 2008 11:06:27 AM <200811221525.mAMFPBGe024405@d12av02.megacenter.de.ibm.com>
> From: Ulrich Weigand [mailto:uweigand@de.ibm.com]
> Sent: Saturday, November 22, 2008 10:25 AM
>
> Michael Snyder wrote:
> > Marc Khouzam wrote:
> > > From what I understand, to debug a Dicos target, I need 'set osabi
> > > DICOS'
> > >
> > > I'm trying to find out how difficult it would be (if at
> all possible),
> > > for GDB to, instead, automatically
> > > detect the target after a 'target remote' command.
> > >
> > > The reason for this is to have the DSF-GDB frontend
> simply be able to
> > > connect to a target, without
> > > requiring the user to specify which type.
> > >
> > > Is it possible?
> >
> > We could set up a query as part of the initial "target remote"
> > handshake. It would be nice to have a standard agreed-upon before
> > implementation.
>
> Hmm, GDB already detects the target automatically, using the
> "target description" mechanism. However, this currently sets
> only the architecture, not the osabi, and in the particular
> case described above, both host and target *architectures* are
> the same, but just the osabi differs ...
>
> I think it would make sense to have the target description
> provide the proper osabi setting as well (maybe using the
> existing "properties" mechanism), and have GDB default to
> the osabi in the target description.
Thanks Ulrich and sorry for the late reply.
What we are hoping for is to use the same GDB binary on a host
to debug many different targets such as:
x86 Linux and non-linux
powerPC linux and non-linux
powerPC Linux and x86 non-linux
...
Emulator e.g. QEMU, Simics,
From what has been said, I believe this is possible, as long as
the user specifies the osabi using the 'set oasbi' command.
If the osabi was automatically set by GDB, as you suggest above,
is there anything else to worry about to allow the
same GDB binary to be able to automatically be ready to debug the
many different targets above?
Thanks again
Marc