This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: RFC: Return piece lists from Dwarf expression evaluation
- From: Jim Blandy <jimb at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: 24 Aug 2004 16:35:17 -0500
- Subject: Re: RFC: Return piece lists from Dwarf expression evaluation
- References: <vt2zn53yh0k.fsf@zenia.home> <vt2acx3v78c.fsf@zenia.home>
Jim Blandy <jimb@redhat.com> writes:
> Jim Blandy <jimb@redhat.com> writes:
> > Here's an implementation of the dwarf2expr interface change I proposed
> > on gdb@ last week.
>
> Here's a revision of that patch that properly handles the 'needs
> frame' case.
>
> 2004-08-09 Jim Blandy <jimb@redhat.com>
>
> * dwarf2expr.h (struct dwarf_expr_context): New members
> 'num_pieces' and 'pieces', for returning the result of an
> expression that uses DW_OP_piece.
> (struct dwarf_expr_piece): New struct type.
> * dwarf2expr.c (new_dwarf_expr_context): Initialize num_pieces and
> pieces.
> (free_dwarf_expr_context): Free pieces, if any.
> (add_piece): New function.
> (execute_stack_op): Implement DW_OP_piece.
> * dwarf2loc.c (dwarf2_evaluate_loc_desc): If the result of the
> expression is a list of pieces, print an error message.
> (dwarf2_loc_desc_needs_frame): If the expression yields
> pieces, and any piece is in a register, then we need a frame.
I've committed this change.