diff options
author | Joel Brobecker <brobecker@gnat.com> | 2012-03-08 22:19:09 +0000 |
---|---|---|
committer | Joel Brobecker <brobecker@gnat.com> | 2012-03-08 22:19:09 +0000 |
commit | 735be1a2c1abfef22d629245caaadd33c9d268b1 (patch) | |
tree | 8c7ef3370b3c65a5fbcaf7d91207a2267c7c5c00 | |
parent | d6b6bbb74438122e1e1e472179bd5e73f69c04e0 (diff) | |
download | gdb-735be1a2c1abfef22d629245caaadd33c9d268b1.zip gdb-735be1a2c1abfef22d629245caaadd33c9d268b1.tar.gz gdb-735be1a2c1abfef22d629245caaadd33c9d268b1.tar.bz2 |
Revert "ax-gdb: Do not treat enums and bools as integers."
This patch was checked hasn't been reviewed and has been checked in
by mistake (wrong patch applied).
-rw-r--r-- | gdb/ax-gdb.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/ax-gdb.c b/gdb/ax-gdb.c index cc057f8..bd81338 100644 --- a/gdb/ax-gdb.c +++ b/gdb/ax-gdb.c @@ -877,6 +877,12 @@ gen_usual_unary (struct expression *exp, struct agent_expr *ax, case TYPE_CODE_STRUCT: case TYPE_CODE_UNION: return; + + /* If the value is an enum or a bool, call it an integer. */ + case TYPE_CODE_ENUM: + case TYPE_CODE_BOOL: + value->type = builtin_type (exp->gdbarch)->builtin_int; + break; } /* If the value is an lvalue, dereference it. */ |