From: Joel Brobecker Date: Thu, 8 Mar 2012 22:19:09 +0000 (+0000) Subject: Revert "ax-gdb: Do not treat enums and bools as integers." X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=735be1a2c1abfef22d629245caaadd33c9d268b1;p=binutils-gdb.git 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). --- 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. */