public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* [RFC] target defined OSABI sniffer
@ 2003-06-26 14:43 Kris Warkentin
  2003-06-26 14:46 ` Daniel Jacobowitz
  2003-06-26 15:50 ` Andrew Cagney
  0 siblings, 2 replies; 4+ messages in thread
From: Kris Warkentin @ 2003-06-26 14:43 UTC (permalink / raw)
  To: Gdb@Sources.Redhat.Com

It seems that a lot of effort has been put into the multi-arch stuff but
most of it centers around recognizing a binary and setting things up based
on that.  I'm pondering whether that is the right approach in all cases.
Shouldn't the target be telling gdb what it should be doing rather than the
other way around?  I've been looking at different ways of getting gdb to
recognize a QNX binary so that it can set the OSABI properly but shouldn't
the fact that I'm connected to a remote neutrino machine be sufficient?

One possible solution that I'm considering is to put something like a
TARGET_SNIFF_OSABI() type function in the generic sniffer.  That way, when
I'm connected to a remote machine, I can just set the osabi and arch to
match that machine.  Then, if the binary isn't compatable, we can error out.

In the native case, my current_target should KNOW that it's on a Neutrino
box and be able to respond with the appropriate osabi.

Can anyone comment on some possible downsides of this?  Our chief architect
is fairly insistent that we shouldn't need a way to recognize a Neutrino
binary and I'm not having a lot of luck convincing him otherwise.  Just from
my experience chasing these osabi problems, it looks like there are LOTS of
places where the arch can shift under my feet.  I'm thinking that maybe core
files or simulators might be a problem.  The other problem might be that
some targets (ICEs, etc.) may have no way of telling gdb what they are.  In
cases like that, I suppose setting everything based on the binary should be
okay.

Mostly I guess I'm asking whether the target should have a way of overriding
the automatic stuff and saying, "I am targetting this, period."

cheers,

Kris


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

* Re: [RFC] target defined OSABI sniffer
  2003-06-26 14:43 [RFC] target defined OSABI sniffer Kris Warkentin
@ 2003-06-26 14:46 ` Daniel Jacobowitz
  2003-06-26 15:50 ` Andrew Cagney
  1 sibling, 0 replies; 4+ messages in thread
From: Daniel Jacobowitz @ 2003-06-26 14:46 UTC (permalink / raw)
  To: Kris Warkentin; +Cc: Gdb@Sources.Redhat.Com

On Thu, Jun 26, 2003 at 10:43:29AM -0400, Kris Warkentin wrote:
> It seems that a lot of effort has been put into the multi-arch stuff but
> most of it centers around recognizing a binary and setting things up based
> on that.  I'm pondering whether that is the right approach in all cases.
> Shouldn't the target be telling gdb what it should be doing rather than the
> other way around?  I've been looking at different ways of getting gdb to
> recognize a QNX binary so that it can set the OSABI properly but shouldn't
> the fact that I'm connected to a remote neutrino machine be sufficient?
> 
> One possible solution that I'm considering is to put something like a
> TARGET_SNIFF_OSABI() type function in the generic sniffer.  That way, when
> I'm connected to a remote machine, I can just set the osabi and arch to
> match that machine.  Then, if the binary isn't compatable, we can error out.
> 
> In the native case, my current_target should KNOW that it's on a Neutrino
> box and be able to respond with the appropriate osabi.
> 
> Can anyone comment on some possible downsides of this?  Our chief architect
> is fairly insistent that we shouldn't need a way to recognize a Neutrino
> binary and I'm not having a lot of luck convincing him otherwise.  Just from
> my experience chasing these osabi problems, it looks like there are LOTS of
> places where the arch can shift under my feet.  I'm thinking that maybe core
> files or simulators might be a problem.  The other problem might be that

You're quite right.  How do you expect to take a binary and a core dump
and realize they are QNX?

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

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

* Re: [RFC] target defined OSABI sniffer
  2003-06-26 14:43 [RFC] target defined OSABI sniffer Kris Warkentin
  2003-06-26 14:46 ` Daniel Jacobowitz
@ 2003-06-26 15:50 ` Andrew Cagney
  2003-06-26 18:56   ` Kris Warkentin
  1 sibling, 1 reply; 4+ messages in thread
From: Andrew Cagney @ 2003-06-26 15:50 UTC (permalink / raw)
  To: Kris Warkentin; +Cc: Gdb@Sources.Redhat.Com

> It seems that a lot of effort has been put into the multi-arch stuff but
> most of it centers around recognizing a binary and setting things up based
> on that.  I'm pondering whether that is the right approach in all cases.
> Shouldn't the target be telling gdb what it should be doing rather than the
> other way around?

Yes.

Will need to read the rest of your e-mail later :-(  BTW, there's also:
http://sources.redhat.com/gdb/papers/multi-arch/real-multi-arch/index.html#SEC40
as a second discussion point.

Andrew


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

* Re: [RFC] target defined OSABI sniffer
  2003-06-26 15:50 ` Andrew Cagney
@ 2003-06-26 18:56   ` Kris Warkentin
  0 siblings, 0 replies; 4+ messages in thread
From: Kris Warkentin @ 2003-06-26 18:56 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: Gdb@Sources.Redhat.Com

Ah...good point.  GDB will need to associate an arch with a frame.  You
can't have backends overriding stuff blindly without knowing the context.

Kris
----- Original Message ----- 
From: "Andrew Cagney" <ac131313@redhat.com>
To: "Kris Warkentin" <kewarken@qnx.com>
Cc: "Gdb@Sources.Redhat.Com" <gdb@sources.redhat.com>
Sent: Thursday, June 26, 2003 11:46 AM
Subject: Re: [RFC] target defined OSABI sniffer


> > It seems that a lot of effort has been put into the multi-arch stuff but
> > most of it centers around recognizing a binary and setting things up
based
> > on that.  I'm pondering whether that is the right approach in all cases.
> > Shouldn't the target be telling gdb what it should be doing rather than
the
> > other way around?
>
> Yes.
>
> Will need to read the rest of your e-mail later :-(  BTW, there's also:
>
http://sources.redhat.com/gdb/papers/multi-arch/real-multi-arch/index.html#SEC40
> as a second discussion point.
>
> Andrew
>
>
>


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

end of thread, other threads:[~2003-06-26 18:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-26 14:43 [RFC] target defined OSABI sniffer Kris Warkentin
2003-06-26 14:46 ` Daniel Jacobowitz
2003-06-26 15:50 ` Andrew Cagney
2003-06-26 18:56   ` Kris Warkentin

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).