This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: Return piece lists from Dwarf expression evaluation


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]