aboutsummaryrefslogtreecommitdiff
path: root/gdb/stabsread.c
diff options
context:
space:
mode:
authorPer Bothner <per@bothner.com>1996-01-24 07:02:57 +0000
committerPer Bothner <per@bothner.com>1996-01-24 07:02:57 +0000
commitc6038971d6957f1244f2224002ba961c81b7ac71 (patch)
tree9647d17c387a1d4a9151394328b021b2f8d9ff60 /gdb/stabsread.c
parent4e327047ce195fe703b5ee64badca4631883cbe0 (diff)
downloadfsf-binutils-gdb-c6038971d6957f1244f2224002ba961c81b7ac71.zip
fsf-binutils-gdb-c6038971d6957f1244f2224002ba961c81b7ac71.tar.gz
fsf-binutils-gdb-c6038971d6957f1244f2224002ba961c81b7ac71.tar.bz2
* stabsread.c (rs6000_builtin_type): Make bool type unsigned.
(read_one_struct_field): Support boolean bitfields. * c-valprint.c (c_val_print): Print booleans properly.
Diffstat (limited to 'gdb/stabsread.c')
-rw-r--r--gdb/stabsread.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/stabsread.c b/gdb/stabsread.c
index ba36fb2..988c75c 100644
--- a/gdb/stabsread.c
+++ b/gdb/stabsread.c
@@ -1855,7 +1855,8 @@ rs6000_builtin_type (typenum)
rettype = init_type (TYPE_CODE_INT, 4, 0, "integer", NULL);
break;
case 16:
- rettype = init_type (TYPE_CODE_BOOL, 4, 0, "boolean", NULL);
+ rettype = init_type (TYPE_CODE_BOOL, 4, TYPE_FLAG_UNSIGNED,
+ "boolean", NULL);
break;
case 17:
rettype = init_type (TYPE_CODE_FLT, 4, 0, "short real", NULL);
@@ -2458,6 +2459,7 @@ read_one_struct_field (fip, pp, p, type, objfile)
and treat enums as if they had the width of ints. */
if (TYPE_CODE (fip -> list -> field.type) != TYPE_CODE_INT
+ && TYPE_CODE (fip -> list -> field.type) != TYPE_CODE_BOOL
&& TYPE_CODE (fip -> list -> field.type) != TYPE_CODE_ENUM)
{
fip -> list -> field.bitsize = 0;