diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2009-06-17 18:40:53 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2009-06-17 18:40:53 +0000 |
commit | 505e835dc07557a142853b0f18513b876f7b7625 (patch) | |
tree | 9fd253e9a536b82d8aa3eb8e386d42045a30abc9 /gdb/dwarf2loc.c | |
parent | 55f960e1d2e58215a0c274e8d30e6036c96a2959 (diff) | |
download | gdb-505e835dc07557a142853b0f18513b876f7b7625.zip gdb-505e835dc07557a142853b0f18513b876f7b7625.tar.gz gdb-505e835dc07557a142853b0f18513b876f7b7625.tar.bz2 |
* ax-gdb.c (gen_bitfield_ref): Add EXP argument, use expression
architecture instead of current_gdbarch.
(gen_struct_ref): Add EXP argument, pass to get_bitfield_ref.
(gen_expr): Pass expression to get_struct_ref.
* symtab.h (struct symbol_ops): Add GDBARCH parameter to
tracepoint_var_ref callback.
* ax-gdb.c (gen_var_ref): Pass architecture to tracepoint_var_ref
symbol operation callback.
* dwarf2loc.c (dwarf2_tracepoint_var_ref): Add GDBARCH parameter.
Use it instead of current_gdbarch.
(locexpr_tracepoint_var_ref): Add GDBARCH parameter. Pass it to
dwarf2_tracepoint_var_ref.
(loclist_tracepoint_var_ref): Likewise.
Diffstat (limited to 'gdb/dwarf2loc.c')
-rw-r--r-- | gdb/dwarf2loc.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c index 4cd7730..16d8cee 100644 --- a/gdb/dwarf2loc.c +++ b/gdb/dwarf2loc.c @@ -366,9 +366,9 @@ dwarf2_loc_desc_needs_frame (gdb_byte *data, unsigned short size, } static void -dwarf2_tracepoint_var_ref (struct symbol *symbol, struct agent_expr *ax, - struct axs_value *value, gdb_byte *data, - int size) +dwarf2_tracepoint_var_ref (struct symbol *symbol, struct gdbarch *gdbarch, + struct agent_expr *ax, struct axs_value *value, + gdb_byte *data, int size) { if (size == 0) error (_("Symbol \"%s\" has been optimized out."), @@ -401,7 +401,7 @@ dwarf2_tracepoint_var_ref (struct symbol *symbol, struct agent_expr *ax, error (_("Unexpected opcode after DW_OP_fbreg for symbol \"%s\"."), SYMBOL_PRINT_NAME (symbol)); - gdbarch_virtual_frame_pointer (current_gdbarch, + gdbarch_virtual_frame_pointer (gdbarch, ax->scope, &frame_reg, &frame_offset); ax_reg (ax, frame_reg); ax_const_l (ax, frame_offset); @@ -522,12 +522,13 @@ locexpr_describe_location (struct symbol *symbol, struct ui_file *stream) against. When there is one this function should be revisited. */ static void -locexpr_tracepoint_var_ref (struct symbol * symbol, struct agent_expr * ax, - struct axs_value * value) +locexpr_tracepoint_var_ref (struct symbol *symbol, struct gdbarch *gdbarch, + struct agent_expr *ax, struct axs_value *value) { struct dwarf2_locexpr_baton *dlbaton = SYMBOL_LOCATION_BATON (symbol); - dwarf2_tracepoint_var_ref (symbol, ax, value, dlbaton->data, dlbaton->size); + dwarf2_tracepoint_var_ref (symbol, gdbarch, ax, value, + dlbaton->data, dlbaton->size); } /* The set of location functions used with the DWARF-2 expression @@ -594,8 +595,8 @@ loclist_describe_location (struct symbol *symbol, struct ui_file *stream) /* Describe the location of SYMBOL as an agent value in VALUE, generating any necessary bytecode in AX. */ static void -loclist_tracepoint_var_ref (struct symbol * symbol, struct agent_expr * ax, - struct axs_value * value) +loclist_tracepoint_var_ref (struct symbol *symbol, struct gdbarch *gdbarch, + struct agent_expr *ax, struct axs_value *value) { struct dwarf2_loclist_baton *dlbaton = SYMBOL_LOCATION_BATON (symbol); gdb_byte *data; @@ -605,7 +606,7 @@ loclist_tracepoint_var_ref (struct symbol * symbol, struct agent_expr * ax, if (data == NULL) error (_("Variable \"%s\" is not available."), SYMBOL_NATURAL_NAME (symbol)); - dwarf2_tracepoint_var_ref (symbol, ax, value, data, size); + dwarf2_tracepoint_var_ref (symbol, gdbarch, ax, value, data, size); } /* The set of location functions used with the DWARF-2 expression |