This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Allow DW_OP_GNU_uninit in dwarf_expr_require_composition
- From: Pedro Alves <palves at redhat dot com>
- To: Andreas Arnez <arnez at linux dot vnet dot ibm dot com>, gdb-patches at sourceware dot org
- Date: Tue, 4 Oct 2016 18:33:45 +0100
- Subject: Re: [PATCH] Allow DW_OP_GNU_uninit in dwarf_expr_require_composition
- Authentication-results: sourceware.org; auth=none
- References: <m3lh3zuf30.fsf@oc1027705133.ibm.com>
On 04/27/2016 06:38 PM, Andreas Arnez wrote:
> In DWARF expression handling, some operators are required to be either
> at the end of an expression or followed by a composition operator. So
> far only the operators DW_OP_reg0-31 were allowed to be followed by
> DW_OP_GNU_uninit instead, and particularly DW_OP_regx was not, which is
> obviously inconsistent.
>
> This patch allows DW_OP_GNU_uninit after all operators requiring a
> composition, to simplify the code and make it more consistent. This
> policy may be more permissive than necessary, but in the worst case just
> leads to a DWARF location description resulting in an uninitialized
> value instead of an error message.
Fine with me. DW_OP_GNU_uninit is underspecified, anyway.
>
> gdb/ChangeLog:
>
> * dwarf2expr.c (dwarf_expr_require_composition): Allow
> DW_OP_GNU_uninit.
> (execute_stack_op): Use dwarf_expr_require_composition instead of
> copying its logic.
OK.
Thanks,
Pedro Alves