diff options
Diffstat (limited to 'gdb/expression.h')
-rw-r--r-- | gdb/expression.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/expression.h b/gdb/expression.h index d20857b..3abaf6e 100644 --- a/gdb/expression.h +++ b/gdb/expression.h @@ -240,7 +240,9 @@ struct expression expression. */ enum exp_opcode first_opcode () const { - return elts[0].opcode; + if (op != nullptr) + return op->opcode (); + return elts[0].opcode; } /* Evaluate the expression. EXPECT_TYPE is the context type of the @@ -252,6 +254,7 @@ struct expression const struct language_defn *language_defn; /* Architecture it was parsed in. */ struct gdbarch *gdbarch; + expr::operation_up op; int nelts = 0; union exp_element *elts; }; |