Introduce expression::first_opcode
authorTom Tromey <tom@tromey.com>
Wed, 16 Dec 2020 01:14:42 +0000 (18:14 -0700)
committerTom Tromey <tom@tromey.com>
Wed, 16 Dec 2020 01:24:02 +0000 (18:24 -0700)
commit2adab65cc07f07a581d57b05dfbc100952fab748
treecf31db8beca37152fd15d8fc9308350dc3cb0150
parent1ab8280d7dbe01f51929d221621d38450f31895d
Introduce expression::first_opcode

This adds a new helper method, expression::first_opcode, that extracts
the outermost opcode of an expression.  This simplifies some patches
in the expression rewrite series.

Note that this patch requires the earlier patch to avoid manual
dissection of OP_TYPE operations.

2020-12-15  Tom Tromey  <tom@tromey.com>

* varobj.c (varobj_create): Use first_opcode.
* value.c (init_if_undefined_command): Use first_opcode.
* typeprint.c (whatis_exp): Use first_opcode.
* tracepoint.c (validate_actionline): Use first_opcode.
(encode_actions_1): Use first_opcode.
* stack.c (return_command): Use first_opcode.
* expression.h (struct expression) <first_opcode>: New method.
* eval.c (parse_and_eval_type): Use first_opcode.
* dtrace-probe.c (dtrace_process_dof_probe): Use first_opcode.
gdb/ChangeLog
gdb/dtrace-probe.c
gdb/eval.c
gdb/expression.h
gdb/stack.c
gdb/tracepoint.c
gdb/typeprint.c
gdb/value.c
gdb/varobj.c
This page took 0.027215 seconds and 4 git commands to generate.