Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org,  Tom Tromey <tromey@redhat.com>
Subject: Re: RFA: fix PR 9164
Date: Mon, 05 Jan 2009 17:29:00 -0000	[thread overview]
Message-ID: <200901051729.39325.pedro@codesourcery.com> (raw)
In-Reply-To: <m34p0grssm.fsf@fleche.redhat.com>

On Saturday 03 January 2009 21:19:53, Tom Tromey wrote:
> +static void
> +find_size_type (const struct builtin_type *builtin,
> +               struct language_arch_info *lai)
> +{
> +  lai->size_type_symbol = "size_t";
> +
> +  /* For the default, pick an unsigned integral type the same width as
> +     a data pointer, if possible.  If none match, use unsigned int.  */
> +  if (TYPE_LENGTH (builtin->builtin_unsigned_long)
> +      == TYPE_LENGTH (builtin->builtin_data_ptr))
> +    lai->size_type_default = builtin->builtin_unsigned_long;
> +  else if (TYPE_LENGTH (builtin->builtin_unsigned_long_long))
> +    lai->size_type_default = builtin->builtin_unsigned_long_long;
> +  else
> +    lai->size_type_default = builtin->builtin_unsigned_int;
> +}

I think that m32c will need a hook here.  I think that in some modes, size_t will
be 16-bit, but pointer width 24-bits.

I wonder if the above shouldn't be a gdbarch method, that defaults to
what you wrote.

-- 
Pedro Alves


  parent reply	other threads:[~2009-01-05 17:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-03 21:20 Tom Tromey
2009-01-04  3:29 ` Daniel Jacobowitz
2009-01-04 18:10   ` Tom Tromey
2009-01-05  4:23     ` Joel Brobecker
2009-01-05  4:51       ` Tom Tromey
2009-01-05  9:23       ` Mark Kettenis
2009-01-05  9:30         ` Joel Brobecker
2009-01-05 17:29 ` Pedro Alves [this message]
2009-01-05 18:31   ` Tom Tromey
2009-01-07 22:13     ` Pedro Alves

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=200901051729.39325.pedro@codesourcery.com \
    --to=pedro@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@redhat.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