From 8cf6f0b103e62f41f7cebe50f959a8c15986bd8e Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Mon, 29 Nov 2010 21:18:16 +0000 Subject: gdb * opencl-lang.c (lval_func_check_synthetic_pointer): New function. * value.h (struct lval_funcs) : New fields. (value_bits_synthetic_pointer): Declare. * value.c (value_bits_synthetic_pointer): New function. * valprint.c (valprint_check_validity): Handle synthetic pointers. * valops.c (value_ind): Use new 'indirect' lval_funcs method. * valarith.c (value_ptradd): Use set_value_component_location. * p-valprint.c (pascal_object_print_value_fields): Handle synthetic pointers. * jv-valprint.c (java_print_value_fields): Handle synthetic pointers. * dwarf2read.c (dwarf_stack_op_name): Add DW_OP_GNU_implicit_pointer. (dwarf2_fetch_die_location_block): Add get_frame_pc, baton arguments. Handle location lists. (fill_in_loclist_baton): New function. (dwarf2_symbol_mark_computed): Use it. * dwarf2loc.h (dwarf2_find_location_expression): Declare. (dwarf2_fetch_die_location_block): Add get_frame_pc, baton arguments. * dwarf2loc.c (dwarf2_find_location_expression): Rename from find_location_expression. No longer static. Update all callers. (dwarf_expr_frame_pc): New function. (per_cu_dwarf_call): Add get_frame_pc, baton arguments. Update all callers. (struct piece_closure) : New field. (allocate_piece_closure): Add per_cu argument. (read_pieced_value): Handle DWARF_VALUE_IMPLICIT_POINTER. (check_pieced_value_bits): Remove validity argument, add check_for argument. Handle DWARF_VALUE_IMPLICIT_POINTER. (check_pieced_value_validity, check_pieced_value_invalid): Update. (check_pieced_synthetic_pointer): New function. (get_frame_address_in_block_wrapper): New function. (indirect_pieced_value): New function. (pieced_value_funcs): Update. (invalid_synthetic_pointer): New function. (dwarf2_evaluate_loc_desc_full): Rename from dwarf2_evaluate_loc_desc. Add byte_offset argument. (dwarf2_evaluate_loc_desc): Rewrite. (dwarf2_loc_desc_needs_frame): Set new field on context. (get_ax_pc): New function. (disassemble_dwarf_expression): Handle DW_OP_GNU_implicit_pointer. * dwarf2expr.h (enum dwarf_value_location) : New constant. (struct dwarf_expr_context) : New field. (struct dwarf_expr_piece) : New field. * dwarf2expr.c (add_piece): Handle DWARF_VALUE_IMPLICIT_POINTER. (execute_stack_op): Handle DW_OP_GNU_implicit_pointer. * dwarf2-frame.c (no_get_frame_pc): New function. (execute_stack_op): Set new field on context. * cp-valprint.c (cp_print_value_fields): Handle synthetic pointers. gdb/testsuite * gdb.dwarf2/implptr.exp: New file. * gdb.dwarf2/implptr.c: New file. * gdb.dwarf2/implptr.S: New file. --- gdb/dwarf2loc.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'gdb/dwarf2loc.h') diff --git a/gdb/dwarf2loc.h b/gdb/dwarf2loc.h index a2cfe7f..e94346c 100644 --- a/gdb/dwarf2loc.h +++ b/gdb/dwarf2loc.h @@ -24,6 +24,7 @@ struct symbol_computed_ops; struct objfile; struct dwarf2_per_cu_data; +struct dwarf2_loclist_baton; /* This header is private to the DWARF-2 reader. It is shared between dwarf2read.c and dwarf2loc.c. */ @@ -45,8 +46,16 @@ int dwarf2_per_cu_offset_size (struct dwarf2_per_cu_data *cu); offset in the parent objfile. */ CORE_ADDR dwarf2_per_cu_text_offset (struct dwarf2_per_cu_data *cu); +/* Find a particular location expression from a location list. */ +const gdb_byte *dwarf2_find_location_expression + (struct dwarf2_loclist_baton *baton, + size_t *locexpr_length, + CORE_ADDR pc); + struct dwarf2_locexpr_baton dwarf2_fetch_die_location_block - (unsigned int offset, struct dwarf2_per_cu_data *per_cu); + (unsigned int offset, struct dwarf2_per_cu_data *per_cu, + CORE_ADDR (*get_frame_pc) (void *baton), + void *baton); /* Evaluate a location description, starting at DATA and with length SIZE, to find the current location of variable of TYPE in the context -- cgit v1.1