public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM] archer-jankratochvil-vla: Fix gdb.pascal/hello.exp regression.
@ 2010-07-11 16:23 jkratoch
0 siblings, 0 replies; only message in thread
From: jkratoch @ 2010-07-11 16:23 UTC (permalink / raw)
To: archer-commits
The branch, archer-jankratochvil-vla has been updated
via 2e9034d729f16f42cc648e142c2bd198c33fa29a (commit)
from dc35b1895fb040aad2c6643e036d9b4340116d3f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email.
- Log -----------------------------------------------------------------
commit 2e9034d729f16f42cc648e142c2bd198c33fa29a
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Sun Jul 11 18:22:50 2010 +0200
Fix gdb.pascal/hello.exp regression.
-----------------------------------------------------------------------
Summary of changes:
gdb/dwarf2read.c | 18 +++++++++---------
gdb/p-lang.c | 6 +++++-
2 files changed, 14 insertions(+), 10 deletions(-)
First 500 lines of diff:
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 6d79ee0..1eb1ad7 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -6442,6 +6442,8 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
LONGEST negative_mask;
base_type = die_type (die, cu);
+ /* Preserve BASE_TYPE's original type, just set its LENGTH. */
+ check_typedef (base_type);
/* The die_type call above may have already set the type for this DIE. */
range_type = get_die_type (die, cu);
@@ -6548,20 +6550,18 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
}
else
{
- if (attr && attr_form_is_constant (attr))
- {
- LONGEST high;
+ LONGEST high;
- high = dwarf2_get_attr_constant_value (attr, 0);
- if (!TYPE_UNSIGNED (base_type) && (high & negative_mask))
- high |= negative_mask;
- TYPE_HIGH_BOUND (range_type) = high;
- }
+ if (attr && attr_form_is_constant (attr))
+ high = dwarf2_get_attr_constant_value (attr, 0);
else
{
TYPE_HIGH_BOUND_UNDEFINED (range_type) = 1;
- TYPE_HIGH_BOUND (range_type) = low - 1;
+ high = low - 1;
}
+ if (!TYPE_UNSIGNED (base_type) && (high & negative_mask))
+ high |= negative_mask;
+ TYPE_HIGH_BOUND (range_type) = high;
}
/* Dwarf-2 specifications explicitly allows to create subrange types
diff --git a/gdb/p-lang.c b/gdb/p-lang.c
index 08738ac..64d2e9f 100644
--- a/gdb/p-lang.c
+++ b/gdb/p-lang.c
@@ -222,7 +222,11 @@ pascal_printstr (struct ui_file *stream, struct type *type,
unsigned int things_printed = 0;
int in_quotes = 0;
int need_comma = 0;
- int width = TYPE_LENGTH (type);
+ int width;
+
+ /* Preserve TYPE's original type, just set its LENGTH. */
+ check_typedef (type);
+ width = TYPE_LENGTH (type);
/* If the string was not truncated due to `set print elements', and
the last byte of it is a null, we don't print that, in traditional C
hooks/post-receive
--
Repository for Project Archer.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-07-11 16:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-11 16:23 [SCM] archer-jankratochvil-vla: Fix gdb.pascal/hello.exp regression 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).