Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Thiago Jung Bauermann <bauerman@br.ibm.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [rfc] Use target descriptions for PowerPC
Date: Fri, 05 Oct 2007 23:59:00 -0000	[thread overview]
Message-ID: <20071005235904.GA24514@caradoc.them.org> (raw)
In-Reply-To: <1191620446.18959.18.camel@localhost.localdomain>

On Fri, Oct 05, 2007 at 06:40:46PM -0300, Thiago Jung Bauermann wrote:
> Hi Daniel,
> 
> On Fri, 2007-10-05 at 12:37 -0400, Daniel Jacobowitz wrote:
> > +  /* If we have a 64-bit binary on a 32-bit target, complain.  Also
> > +     complain for a 32-bit binary on a 64-bit target; we do not yet
> > +     support that.  */
> > +  if (tdesc_wordsize != -1 && tdesc_wordsize != wordsize)
> > +    {
> > +      tdesc_data_cleanup (tdesc_data);
> > +      return NULL;
> > +    }
> 
> Sorry if I am confusing things here. This sounds like it affects 64 bit
> GDB debugging 32 bit binary. Is this the case? Or only for remote
> debugging?

Good noticing, it could be a problem, but it works out fine - we don't
have a supplied target description in this case, so we pick a default
based on the 32-bit binary, and get a 32-bit binary; everything
matches.  Then the GNU/Linux native code handles the details.  I've
just tested that.

The problem I'm trying to prevent is that we will always use registers
of the size described by the target description.  And we don't support
implementing the 32-bit ABI on top of 64-bit GPRs; we'll copy
arguments into the high half of registers when calling functions, for
instance.  Try connecting a GDB to a 64-bit gdbserver and it will go
wrong in a couple of ways.  The native targets fake this by knowing
how to supply 32-bit registers when expected, even if you'd think
there ought to be 64-bit registers.

-- 
Daniel Jacobowitz
CodeSourcery


  reply	other threads:[~2007-10-05 23:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-05 16:38 Daniel Jacobowitz
2007-10-05 17:00 ` Eli Zaretskii
2007-10-05 17:40   ` Daniel Jacobowitz
2007-10-05 21:40 ` Thiago Jung Bauermann
2007-10-05 23:59   ` Daniel Jacobowitz [this message]
2007-10-06 16:05     ` Thiago Jung Bauermann
2007-10-06 18:04       ` Daniel Jacobowitz
2007-10-06 16:01 ` Thiago Jung Bauermann
2007-10-06 18:00   ` Daniel Jacobowitz
2007-10-15 19:52 ` Daniel Jacobowitz

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=20071005235904.GA24514@caradoc.them.org \
    --to=drow@false.org \
    --cc=bauerman@br.ibm.com \
    --cc=gdb-patches@sourceware.org \
    /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