Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Thiago Jung Bauermann <bauerman@br.ibm.com>
To: "Dr. Rolf Jansen" <rolf.anroni@gmail.com>
Cc: gdb-patches@sourceware.org
Subject: Re: Two minor issues
Date: Wed, 27 Aug 2008 13:48:00 -0000	[thread overview]
Message-ID: <1219844750.6615.4.camel@localhost.localdomain> (raw)
In-Reply-To: <16C866B7-F5D2-4D95-922F-9D19ABC54D45@gmail.com>

On Wed, 2008-08-27 at 08:55 -0300, Dr. Rolf Jansen wrote:
> Is there a global way to find out at compile-time at the build or host  
> system the ptr-size and the long-size of the configured target  
> machine, something like size_attarget_of()?

It's not enough to do that at compile time, since some targets support
running both 32-bit and 64-bit programs (e.g., ppc64-linux). You can
check at runtime, if you have a struct gdbarch nearby:

  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);

  if (tdep->wordsize == 4)
    {
      ...
    }

 if (tdep->wordsize == 8)
    {
      ...
    }

-- 
[]'s
Thiago Jung Bauermann
IBM Linux Technology Center


  parent reply	other threads:[~2008-08-27 13:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-27 11:56 Dr. Rolf Jansen
2008-08-27 13:28 ` [commit] Add missing include (Re: Two minor issues) Ulrich Weigand
2008-08-27 13:58   ` Dr. Rolf Jansen
2008-08-27 13:48 ` Thiago Jung Bauermann [this message]
2008-08-27 13:56   ` Two minor issues Daniel Jacobowitz
2008-08-27 17:46     ` Dr. Rolf Jansen

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=1219844750.6615.4.camel@localhost.localdomain \
    --to=bauerman@br.ibm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=rolf.anroni@gmail.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