This is the mail archive of the gdb@sourceware.org mailing list for the GDB 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: GDB for multiple targets


 

> 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






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