mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-19 17:18:24 +08:00
Introduce last_operation
This adds class last_operation, which implements OP_LAST. gdb/ChangeLog 2021-03-08 Tom Tromey <tom@tromey.com> * expop.h (class last_operation): New.
This commit is contained in:
@ -1,3 +1,7 @@
|
|||||||
|
2021-03-08 Tom Tromey <tom@tromey.com>
|
||||||
|
|
||||||
|
* expop.h (class last_operation): New.
|
||||||
|
|
||||||
2021-03-08 Tom Tromey <tom@tromey.com>
|
2021-03-08 Tom Tromey <tom@tromey.com>
|
||||||
|
|
||||||
* expop.h (class func_static_var_operation): New.
|
* expop.h (class func_static_var_operation): New.
|
||||||
|
18
gdb/expop.h
18
gdb/expop.h
@ -579,6 +579,24 @@ public:
|
|||||||
{ return OP_FUNC_STATIC_VAR; }
|
{ return OP_FUNC_STATIC_VAR; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class last_operation
|
||||||
|
: public tuple_holding_operation<int>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
using tuple_holding_operation::tuple_holding_operation;
|
||||||
|
|
||||||
|
value *evaluate (struct type *expect_type,
|
||||||
|
struct expression *exp,
|
||||||
|
enum noside noside) override
|
||||||
|
{
|
||||||
|
return access_value_history (std::get<0> (m_storage));
|
||||||
|
}
|
||||||
|
|
||||||
|
enum exp_opcode opcode () const override
|
||||||
|
{ return OP_LAST; }
|
||||||
|
};
|
||||||
|
|
||||||
} /* namespace expr */
|
} /* namespace expr */
|
||||||
|
|
||||||
#endif /* EXPOP_H */
|
#endif /* EXPOP_H */
|
||||||
|
Reference in New Issue
Block a user