summaryrefslogtreecommitdiff
path: root/gdb/ax-gdb.c
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2012-03-08 22:19:09 +0000
committerJoel Brobecker <brobecker@gnat.com>2012-03-08 22:19:09 +0000
commit509548bab1144810d50556a34c768e33366f34ef (patch)
treedfce1d27d93adcd1610a946be054e5d592612f90 /gdb/ax-gdb.c
parent6711d8d07852274e57eeda9cb28ded36d68c2916 (diff)
downloadgdb-509548bab1144810d50556a34c768e33366f34ef.tar.gz
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).
Diffstat (limited to 'gdb/ax-gdb.c')
-rw-r--r--gdb/ax-gdb.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/ax-gdb.c b/gdb/ax-gdb.c
index cc057f89a02..bd813380fe2 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. */