diff options
author | Jim Kingdon <jkingdon@engr.sgi.com> | 1994-01-11 04:54:53 +0000 |
---|---|---|
committer | Jim Kingdon <jkingdon@engr.sgi.com> | 1994-01-11 04:54:53 +0000 |
commit | 85b8aa88efd20f0b0956bd1910237ca36c8ec9c6 (patch) | |
tree | 6db401515806c54c768a130993a335a700109ee5 /gdb/c-valprint.c | |
parent | 166b44e41ebda9be1da66b9c78c3cab10b62e430 (diff) | |
download | gdb-85b8aa88efd20f0b0956bd1910237ca36c8ec9c6.zip gdb-85b8aa88efd20f0b0956bd1910237ca36c8ec9c6.tar.gz gdb-85b8aa88efd20f0b0956bd1910237ca36c8ec9c6.tar.bz2 |
* c-valprint.c (c_val_print): Treat TYPE_CODE_RANGE like TYPE_CODE_INT.
Diffstat (limited to 'gdb/c-valprint.c')
-rw-r--r-- | gdb/c-valprint.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c index b370db9..9d5869c 100644 --- a/gdb/c-valprint.c +++ b/gdb/c-valprint.c @@ -340,6 +340,16 @@ c_val_print (type, valaddr, address, stream, format, deref_ref, recurse, /* Do something at least vaguely reasonable, for example if the language is set wrong. */ + case TYPE_CODE_RANGE: + /* FIXME: create_range_type does not set the unsigned bit in a + range type (I think it probably should copy it from the target + type), so we won't print values which are too large to + fit in a signed integer correctly. */ + /* FIXME: Doesn't handle ranges of enums correctly. (Can't just + print with the target type, though, because the size of our type + and the target type might differ). */ + /* FALLTHROUGH */ + case TYPE_CODE_INT: format = format ? format : output_format; if (format) @@ -396,11 +406,6 @@ c_val_print (type, valaddr, address, stream, format, deref_ref, recurse, fprintf_filtered (stream, "<error type>"); break; - case TYPE_CODE_RANGE: - /* FIXME, we should not ever have to print one of these yet. */ - fprintf_filtered (stream, "<range type>"); - break; - case TYPE_CODE_UNDEF: /* This happens (without TYPE_FLAG_STUB set) on systems which don't use dbx xrefs (NO_DBX_XREFS in gcc) if a file has a "struct foo *bar" |