aboutsummaryrefslogtreecommitdiff
path: root/gdb/p-valprint.c
diff options
context:
space:
mode:
authorPierre Muller <muller@sourceware.org>2010-05-17 15:29:02 +0000
committerPierre Muller <muller@sourceware.org>2010-05-17 15:29:02 +0000
commit7a081a30fdfabd82e038396825f02f04fa448c00 (patch)
tree5f60c70fd8667792d4ff363bc5e1ced6ea2d6caf /gdb/p-valprint.c
parent77382aeed26e6fc0510c4ed0d0c2bd92e2c956f5 (diff)
downloadgdb-7a081a30fdfabd82e038396825f02f04fa448c00.zip
gdb-7a081a30fdfabd82e038396825f02f04fa448c00.tar.gz
gdb-7a081a30fdfabd82e038396825f02f04fa448c00.tar.bz2
* p-valprint.c (pascal_val_print): Handle set type if range limits
are undefined but size is known.
Diffstat (limited to 'gdb/p-valprint.c')
-rw-r--r--gdb/p-valprint.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/p-valprint.c b/gdb/p-valprint.c
index 78cba98..5f495b5 100644
--- a/gdb/p-valprint.c
+++ b/gdb/p-valprint.c
@@ -480,6 +480,14 @@ pascal_val_print (struct type *type, const gdb_byte *valaddr,
fputs_filtered ("[", stream);
i = get_discrete_bounds (range, &low_bound, &high_bound);
+ if (low_bound == 0 && high_bound == -1 && TYPE_LENGTH (type) > 0)
+ {
+ /* If we know the size of the set type, we can figure out the
+ maximum value. */
+ i = 0;
+ high_bound = TYPE_LENGTH (type) * TARGET_CHAR_BIT - 1;
+ TYPE_HIGH_BOUND (range) = high_bound;
+ }
maybe_bad_bstring:
if (i < 0)
{