Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Ulrich Weigand <uweigand@de.ibm.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [rfa/Ada] Restructure fixed array range fall-back to remove 	builtin types
Date: Mon, 29 Jun 2009 15:38:00 -0000	[thread overview]
Message-ID: <20090629153842.GB7584@adacore.com> (raw)
In-Reply-To: <200906261552.n5QFqLHr029329@d12av02.megacenter.de.ibm.com>

> I've tested this on amd64-linux with no regressions, however that doesn't
> say much, as the FSF mainline Ada compiler often doesn't even generate _XA
> types (the front-end generates them, but the middle-end never emits them
> because it considers them unused ...).

It's hard to test, because a failure to find the target type of an XA
type would be a bug in the compiler. So this code is really there to make
things a little more robust.

> 	* ada-lang.c (to_fixed_range_type): Add ORIG_TYPE argument.
> 	Fall back to orig_type as index type if symbol lookup fails.
> 	Allocate result types from ORIG_TYPE's objfile.
> 	(ada_array_bound_from_type, to_fixed_array_type,
> 	ada_evaluate_subexp): Pass original index type to
> 	to_fixed_range_type.  Do not pass objfile.
> 
> 	* ada-typeprint.c (print_range_type_named): Add ORIG_TYPE argument.
> 	Fall back to orig_type as index type if symbol lookup fails.
> 	(print_array_type, ada_print_type): Pass original index type
> 	to print_range_type_named.

This makes sense to me, and I verified that you handle the case of
array index types that are range types.  So OK.

-- 
Joel


  reply	other threads:[~2009-06-29 15:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-26 15:53 Ulrich Weigand
2009-06-29 15:38 ` Joel Brobecker [this message]
2009-06-29 17:29   ` Ulrich Weigand

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=20090629153842.GB7584@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=uweigand@de.ibm.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