public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM]  archer-jankratochvil-vla: Fix range TYPE_UNSIGNED.  - Fixes regression for 32bit targets on: gdb.ada/fixed_points.exp
@ 2011-01-10 21:12 jkratoch
  0 siblings, 0 replies; only message in thread
From: jkratoch @ 2011-01-10 21:12 UTC (permalink / raw)
  To: archer-commits

The branch, archer-jankratochvil-vla has been updated
       via  79092f2cbcd7ede37a20ce6119dc6883ba85849c (commit)
      from  3ebce94af4148c7b50726761fb28692f1a62854a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit 79092f2cbcd7ede37a20ce6119dc6883ba85849c
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Mon Jan 10 22:11:41 2011 +0100

    Fix range TYPE_UNSIGNED.
     - Fixes regression for 32bit targets on: gdb.ada/fixed_points.exp

-----------------------------------------------------------------------

Summary of changes:
 gdb/dwarf2read.c |    1 +
 gdb/gdbtypes.c   |   12 ++++++++++--
 2 files changed, 11 insertions(+), 2 deletions(-)

First 500 lines of diff:
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 6352786..b30a7d1 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -8262,6 +8262,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
 
   /* LOW_BOUND and HIGH_BOUND are set for real below.  */
   range_type = create_range_type (NULL, base_type, 0, -1);
+  TYPE_UNSIGNED (range_type) = 0;
 
   negative_mask = 
     (LONGEST) -1 << (TYPE_LENGTH (base_type) * TARGET_CHAR_BIT - 1);
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index 5bfe1c7..59ce6c4 100644
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -3532,8 +3532,12 @@ copy_type_recursive_1 (struct objfile *objfile,
 	      TYPE_LOW_BOUND_UNDEFINED (new_type) = 1;
 	    }
 	  else
-	    TYPE_LOW_BOUND (new_type) = dwarf_locexpr_baton_eval
+	    {
+	      TYPE_LOW_BOUND (new_type) = dwarf_locexpr_baton_eval
 				(TYPE_RANGE_DATA (new_type)->low.u.dwarf_block);
+	      if (TYPE_LOW_BOUND (new_type) >= 0)
+		TYPE_UNSIGNED (new_type) = 1;
+	    }
 	  TYPE_RANGE_DATA (new_type)->low.kind = RANGE_BOUND_KIND_CONSTANT;
 	  break;
 	case RANGE_BOUND_KIND_DWARF_LOCLIST:
@@ -3549,7 +3553,11 @@ copy_type_recursive_1 (struct objfile *objfile,
 	        && dwarf_loclist_baton_eval
 		  (TYPE_RANGE_DATA (new_type)->low.u.dwarf_loclist.loclist,
 		   TYPE_RANGE_DATA (new_type)->low.u.dwarf_loclist.type, &addr))
-	      TYPE_LOW_BOUND (new_type) = addr;
+	      {
+		TYPE_LOW_BOUND (new_type) = addr;
+		if (TYPE_LOW_BOUND (new_type) >= 0)
+		  TYPE_UNSIGNED (new_type) = 1;
+	      }
 	    else
 	      {
 		/* We should set 1 for Fortran but how to find the language?  */


hooks/post-receive
--
Repository for Project Archer.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-01-10 21:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-10 21:12 [SCM] archer-jankratochvil-vla: Fix range TYPE_UNSIGNED. - Fixes regression for 32bit targets on: gdb.ada/fixed_points.exp jkratoch

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