use it instead of current_gdbarch.
* frame.h (deprecated_pc_in_call_dummy): Add GDBARCH parameter.
* arm-tdep.c (arm_skip_prologue): Pass architecture to
deprecated_pc_in_call_dummy.
* symtab.c (skip_prologue_using_sal): Add GDBARCH parameter.
Use it instead of current_gdbarch.
* symtab.h (skip_prologue_using_sal): Add GDBARCH parameter.
* breakpoint.c (expand_line_sal_maybe): Pass architecture to
skip_prologue_using_sal.
* arm-tdep.c (skip_prologue_using_sal): Likewise.
* lm32-tdep.c (lm32_skip_prologue): Likewise.
* m32-tdep.c (m32c_skip_prologue): Likewise.
* mips-tdep.c (mips_skip_prologue): Likewise.
* moxie-tdep.c (moxie_skip_prologue): Likewise.
* mt-tdep.c (mt_frame_unwind_cache): Likewise.
* rs6000-tdep.c (rs6000_skip_prologue): Likewise.
* frv-tdep.c (frv_analyze_prologue): Add GDBARCH parameter, pass
it to skip_prologue_using_sal. Update call sites ...
(frv_skip_prologue, frv_frame_unwind_cache): ... here.
* mn10300-tdep.c (struct mn10300_prologue): Add GDBARCH member.
(check_for_saved): Use it instead of current_gdbarch.
(mn10300_analyze_prologue): Set it.
* value.c (using_struct_return): Add GDBARCH parameter. Use it
instead of current_gdbarch.
* value.h (using_struct_return): Add GDBARCH parameter.
* eval.c (evaluate_subexp_standard): Pass architecture to
using_struct_return.
* infcall.c (call_function_by_hand): Likewise.
* stack.c (return_command): Likewise.
* sparc-tdep.c (sparc32_push_dummy_code): Likewise.
* symtab.c (in_prologue): Add GDBARCH parameter. Use it instead of
current_gdbarch.
* symtab.h (in_prologue): Add GDBARCH parameter.
* infrun.c (handle_inferior_event): Pass architecture to in_prologue.
* eval.c (evaluate_subexp_standard): Use expression architecture
instead of current_gdbarch.
* c-lang.c (evaluate_subexp_c): Use expression architecture and
language instead of current_gdbarch and current_language.
* printcmd.c (do_one_display): Use expression architecture instead
of current_gdbarch.
* infcmd.c (print_return_value): Use architecture of stop_regcache
instead of current_gdbarch.
(print_vector_info, print_float_info): Remove GDBARCH argument,
use frame architecture instead.
(vector_info, float_info): Update calls.
* objc-lang.c (objc_skip_trampoline): Use frame architecture
instead of current_gdbarch.
* parse.c (write_dollar_variable): Use parse architecture instead
of current_gdbarch.
* source.c (line_info): Use objfile architecture instead of
current_gdbarch.
* symtab.c (find_function_start_sal): Use gdbarch instead of
current_gdbarch.
(print_msymbol_info): Use objfile architecture instead of
current_gdbarch.
* valops.c (value_assign): Use frame architecture instead of
current_gdbarch.
+2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * dummy-frame.c (deprecated_pc_in_call_dummy): Add GDBARCH parameter,
+ use it instead of current_gdbarch.
+ * frame.h (deprecated_pc_in_call_dummy): Add GDBARCH parameter.
+ * arm-tdep.c (arm_skip_prologue): Pass architecture to
+ deprecated_pc_in_call_dummy.
+
+ * symtab.c (skip_prologue_using_sal): Add GDBARCH parameter.
+ Use it instead of current_gdbarch.
+ * symtab.h (skip_prologue_using_sal): Add GDBARCH parameter.
+ * breakpoint.c (expand_line_sal_maybe): Pass architecture to
+ skip_prologue_using_sal.
+ * arm-tdep.c (skip_prologue_using_sal): Likewise.
+ * lm32-tdep.c (lm32_skip_prologue): Likewise.
+ * m32-tdep.c (m32c_skip_prologue): Likewise.
+ * mips-tdep.c (mips_skip_prologue): Likewise.
+ * moxie-tdep.c (moxie_skip_prologue): Likewise.
+ * mt-tdep.c (mt_frame_unwind_cache): Likewise.
+ * rs6000-tdep.c (rs6000_skip_prologue): Likewise.
+ * frv-tdep.c (frv_analyze_prologue): Add GDBARCH parameter, pass
+ it to skip_prologue_using_sal. Update call sites ...
+ (frv_skip_prologue, frv_frame_unwind_cache): ... here.
+
+ * mn10300-tdep.c (struct mn10300_prologue): Add GDBARCH member.
+ (check_for_saved): Use it instead of current_gdbarch.
+ (mn10300_analyze_prologue): Set it.
+
+ * value.c (using_struct_return): Add GDBARCH parameter. Use it
+ instead of current_gdbarch.
+ * value.h (using_struct_return): Add GDBARCH parameter.
+ * eval.c (evaluate_subexp_standard): Pass architecture to
+ using_struct_return.
+ * infcall.c (call_function_by_hand): Likewise.
+ * stack.c (return_command): Likewise.
+ * sparc-tdep.c (sparc32_push_dummy_code): Likewise.
+
+ * symtab.c (in_prologue): Add GDBARCH parameter. Use it instead of
+ current_gdbarch.
+ * symtab.h (in_prologue): Add GDBARCH parameter.
+ * infrun.c (handle_inferior_event): Pass architecture to in_prologue.
+
+ * eval.c (evaluate_subexp_standard): Use expression architecture
+ instead of current_gdbarch.
+
+ * c-lang.c (evaluate_subexp_c): Use expression architecture and
+ language instead of current_gdbarch and current_language.
+
+ * printcmd.c (do_one_display): Use expression architecture instead
+ of current_gdbarch.
+
+ * infcmd.c (print_return_value): Use architecture of stop_regcache
+ instead of current_gdbarch.
+ (print_vector_info, print_float_info): Remove GDBARCH argument,
+ use frame architecture instead.
+ (vector_info, float_info): Update calls.
+
+ * objc-lang.c (objc_skip_trampoline): Use frame architecture
+ instead of current_gdbarch.
+
+ * parse.c (write_dollar_variable): Use parse architecture instead
+ of current_gdbarch.
+
+ * source.c (line_info): Use objfile architecture instead of
+ current_gdbarch.
+
+ * symtab.c (find_function_start_sal): Use gdbarch instead of
+ current_gdbarch.
+ (print_msymbol_info): Use objfile architecture instead of
+ current_gdbarch.
+
+ * valops.c (value_assign): Use frame architecture instead of
+ current_gdbarch.
+
2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
* buildsym.c (record_line): Remove call to gdbarch_addr_bits_remove.
struct symtab_and_line sal;
/* If we're in a dummy frame, don't even try to skip the prologue. */
- if (deprecated_pc_in_call_dummy (pc))
+ if (deprecated_pc_in_call_dummy (gdbarch, pc))
return pc;
/* See if we can determine the end of the prologue via the symbol table.
is greater. */
if (find_pc_partial_function (pc, NULL, &func_addr, NULL))
{
- CORE_ADDR post_prologue_pc = skip_prologue_using_sal (func_addr);
+ CORE_ADDR post_prologue_pc
+ = skip_prologue_using_sal (gdbarch, func_addr);
if (post_prologue_pc != 0)
return max (pc, post_prologue_pc);
}
information. If the debug information could not be used to provide
that bound, then use an arbitrary large number as the upper bound. */
/* Like arm_scan_prologue, stop no later than pc + 64. */
- limit_pc = skip_prologue_using_sal (pc);
+ limit_pc = skip_prologue_using_sal (gdbarch, pc);
if (limit_pc == 0)
limit_pc = pc + 64; /* Magic. */
if (sym)
expanded.sals[i] = find_function_start_sal (sym, 1);
else
- expanded.sals[i].pc
- = gdbarch_skip_prologue (current_gdbarch, pc);
+ {
+ /* Since find_pc_partial_function returned true,
+ we should really always find the section here. */
+ struct obj_section *section = find_pc_section (pc);
+ if (section)
+ {
+ struct gdbarch *gdbarch
+ = get_objfile_arch (section->objfile);
+ expanded.sals[i].pc
+ = gdbarch_skip_prologue (gdbarch, pc);
+ }
+ }
}
}
}
switch (dest_type & ~C_CHAR)
{
case C_STRING:
- type = language_string_char_type (current_language,
- current_gdbarch);
+ type = language_string_char_type (exp->language_defn,
+ exp->gdbarch);
break;
case C_WIDE_STRING:
type = lookup_typename ("wchar_t", NULL, 0);
NOTE: cagney/2004-08-02: Code should not need to call this. */
int
-deprecated_pc_in_call_dummy (CORE_ADDR pc)
+deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc)
{
struct dummy_frame *dummyframe;
for (dummyframe = dummy_frame_stack;
{
if ((pc >= dummyframe->id.code_addr)
&& (pc <= dummyframe->id.code_addr
- + gdbarch_decr_pc_after_break (current_gdbarch)))
+ + gdbarch_decr_pc_after_break (gdbarch)))
return 1;
}
return 0;
struct value *val;
(*pos) += 3 + BYTES_TO_EXP_ELEM (exp->elts[pc + 1].longconst + 1);
- regno = user_reg_map_name_to_regnum (current_gdbarch,
+ regno = user_reg_map_name_to_regnum (exp->gdbarch,
name, strlen (name));
if (regno == -1)
error (_("Register $%s not available."), name);
So for these registers, we fetch the register value regardless
of the evaluation mode. */
if (noside == EVAL_AVOID_SIDE_EFFECTS
- && regno < gdbarch_num_regs (current_gdbarch)
- + gdbarch_num_pseudo_regs (current_gdbarch))
- val = value_zero (register_type (current_gdbarch, regno), not_lval);
+ && regno < gdbarch_num_regs (exp->gdbarch)
+ + gdbarch_num_pseudo_regs (exp->gdbarch))
+ val = value_zero (register_type (exp->gdbarch, regno), not_lval);
else
val = value_of_register (regno, get_selected_frame (NULL));
if (val == NULL)
val_type = expect_type;
}
- struct_return = using_struct_return (value_type (method), val_type);
+ struct_return = using_struct_return (exp->gdbarch,
+ value_type (method), val_type);
}
else if (expect_type != NULL)
{
- struct_return = using_struct_return (NULL,
+ struct_return = using_struct_return (exp->gdbarch, NULL,
check_typedef (expect_type));
}
extern struct frame_info *block_innermost_frame (struct block *);
-extern int deprecated_pc_in_call_dummy (CORE_ADDR pc);
+extern int deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc);
/* FIXME: cagney/2003-02-02: Should be deprecated or replaced with a
function called get_frame_register_p(). This slightly weird (and
arguments in any frame but the top, you'll need to do this serious
prologue analysis. */
static CORE_ADDR
-frv_analyze_prologue (CORE_ADDR pc, struct frame_info *this_frame,
+frv_analyze_prologue (struct gdbarch *gdbarch, CORE_ADDR pc,
+ struct frame_info *this_frame,
struct frv_unwind_cache *info)
{
/* When writing out instruction bitpatterns, we use the following
/* Try to compute an upper limit (on how far to scan) based on the
line number info. */
- lim_pc = skip_prologue_using_sal (pc);
+ lim_pc = skip_prologue_using_sal (gdbarch, pc);
/* If there's no line number info, lim_pc will be 0. In that case,
set the limit to be 100 instructions away from pc. Hopefully, this
will be far enough away to account for the entire prologue. Don't
If we didn't find a real source location past that, then
do a full analysis of the prologue. */
if (new_pc < pc + 20)
- new_pc = frv_analyze_prologue (pc, 0, 0);
+ new_pc = frv_analyze_prologue (gdbarch, pc, 0, 0);
return new_pc;
}
info->saved_regs = trad_frame_alloc_saved_regs (this_frame);
/* Prologue analysis does the rest... */
- frv_analyze_prologue (get_frame_func (this_frame), this_frame, info);
+ frv_analyze_prologue (gdbarch,
+ get_frame_func (this_frame), this_frame, info);
return info;
}
}
else
{
- struct_return = using_struct_return (value_type (function), values_type);
+ struct_return = using_struct_return (gdbarch,
+ value_type (function), values_type);
target_values_type = values_type;
}
static void
print_return_value (struct type *func_type, struct type *value_type)
{
- struct gdbarch *gdbarch = current_gdbarch;
+ struct gdbarch *gdbarch = get_regcache_arch (stop_registers);
struct cleanup *old_chain;
struct ui_stream *stb;
struct value *value;
}
static void
-print_vector_info (struct gdbarch *gdbarch, struct ui_file *file,
+print_vector_info (struct ui_file *file,
struct frame_info *frame, const char *args)
{
+ struct gdbarch *gdbarch = get_frame_arch (frame);
+
if (gdbarch_print_vector_info_p (gdbarch))
gdbarch_print_vector_info (gdbarch, file, frame, args);
else
if (!target_has_registers)
error (_("The program has no registers now."));
- print_vector_info (current_gdbarch, gdb_stdout,
- get_selected_frame (NULL), args);
+ print_vector_info (gdb_stdout, get_selected_frame (NULL), args);
}
\f
/* Kill the inferior process. Make us have no inferior. */
}
static void
-print_float_info (struct gdbarch *gdbarch, struct ui_file *file,
+print_float_info (struct ui_file *file,
struct frame_info *frame, const char *args)
{
+ struct gdbarch *gdbarch = get_frame_arch (frame);
+
if (gdbarch_print_float_info_p (gdbarch))
gdbarch_print_float_info (gdbarch, file, frame, args);
else
if (!target_has_registers)
error (_("The program has no registers now."));
- print_float_info (current_gdbarch, gdb_stdout,
- get_selected_frame (NULL), args);
+ print_float_info (gdb_stdout, get_selected_frame (NULL), args);
}
\f
static void
if ((ecs->event_thread->step_over_calls == STEP_OVER_NONE)
|| ((ecs->event_thread->step_range_end == 1)
- && in_prologue (ecs->event_thread->prev_pc,
+ && in_prologue (gdbarch, ecs->event_thread->prev_pc,
ecs->stop_func_start)))
{
/* I presume that step_over_calls is only 0 when we're
is greater. */
if (find_pc_partial_function (pc, NULL, &func_addr, NULL))
{
- CORE_ADDR post_prologue_pc = skip_prologue_using_sal (func_addr);
+ CORE_ADDR post_prologue_pc
+ = skip_prologue_using_sal (gdbarch, func_addr);
if (post_prologue_pc != 0)
return max (pc, post_prologue_pc);
}
/* Find an upper limit on the function prologue using the debug
information. If the debug information could not be used to provide
that bound, then use an arbitrary large number as the upper bound. */
- limit_pc = skip_prologue_using_sal (pc);
+ limit_pc = skip_prologue_using_sal (gdbarch, pc);
if (limit_pc == 0)
limit_pc = pc + 100; /* Magic. */
/* Find end by prologue analysis. */
m32c_analyze_prologue (gdbarch, ip, func_end, &p);
/* Find end by line info. */
- sal_end = skip_prologue_using_sal (ip);
+ sal_end = skip_prologue_using_sal (gdbarch, ip);
/* Return whichever is lower. */
if (sal_end != 0 && sal_end != ip && sal_end < p.prologue_end)
return sal_end;
is greater. */
if (find_pc_partial_function (pc, NULL, &func_addr, NULL))
{
- CORE_ADDR post_prologue_pc = skip_prologue_using_sal (func_addr);
+ CORE_ADDR post_prologue_pc
+ = skip_prologue_using_sal (gdbarch, func_addr);
if (post_prologue_pc != 0)
return max (pc, post_prologue_pc);
}
/* Find an upper limit on the function prologue using the debug
information. If the debug information could not be used to provide
that bound, then use an arbitrary large number as the upper bound. */
- limit_pc = skip_prologue_using_sal (pc);
+ limit_pc = skip_prologue_using_sal (gdbarch, pc);
if (limit_pc == 0)
limit_pc = pc + 100; /* Magic. */
/* This structure holds the results of a prologue analysis. */
struct mn10300_prologue
{
+ /* The architecture for which we generated this prologue info. */
+ struct gdbarch *gdbarch;
+
/* The offset from the frame base to the stack pointer --- always
zero or negative.
if (value.kind == pvk_register
&& value.k == 0
&& pv_is_register (addr, E_SP_REGNUM)
- && size == register_size (current_gdbarch, value.reg))
+ && size == register_size (result->gdbarch, value.reg))
result->reg_offset[value.reg] = addr.k;
}
int am33_mode = AM33_MODE (gdbarch);
memset (result, 0, sizeof (*result));
+ result->gdbarch = gdbarch;
for (rn = 0; rn < MN10300_MAX_NUM_REGS; rn++)
{
is greater. */
if (find_pc_partial_function (pc, &func_name, &func_addr, &func_end))
{
- CORE_ADDR post_prologue_pc = skip_prologue_using_sal (func_addr);
+ CORE_ADDR post_prologue_pc
+ = skip_prologue_using_sal (gdbarch, func_addr);
if (post_prologue_pc != 0)
return max (pc, post_prologue_pc);
else
return info;
end_addr = get_frame_pc (this_frame);
- prologue_end_addr = skip_prologue_using_sal (start_addr);
+ prologue_end_addr = skip_prologue_using_sal (gdbarch, start_addr);
if (end_addr == 0)
for (next_addr = start_addr; next_addr < end_addr; next_addr += 4)
{
static CORE_ADDR
objc_skip_trampoline (struct frame_info *frame, CORE_ADDR stop_pc)
{
+ struct gdbarch *gdbarch = get_frame_arch (frame);
CORE_ADDR real_stop_pc;
CORE_ADDR method_stop_pc;
- real_stop_pc = gdbarch_skip_trampoline_code
- (current_gdbarch, frame, stop_pc);
+ real_stop_pc = gdbarch_skip_trampoline_code (gdbarch, frame, stop_pc);
if (real_stop_pc != 0)
find_objc_msgcall (real_stop_pc, &method_stop_pc);
if (method_stop_pc)
{
real_stop_pc = gdbarch_skip_trampoline_code
- (current_gdbarch, frame, method_stop_pc);
+ (gdbarch, frame, method_stop_pc);
if (real_stop_pc == 0)
real_stop_pc = method_stop_pc;
}
/* Handle tokens that refer to machine registers:
$ followed by a register name. */
- i = user_reg_map_name_to_regnum (current_gdbarch,
+ i = user_reg_map_name_to_regnum (parse_gdbarch,
str.ptr + 1, str.length - 1);
if (i >= 0)
goto handle_register;
val = evaluate_expression (d->exp);
addr = value_as_address (val);
if (d->format.format == 'i')
- addr = gdbarch_addr_bits_remove (current_gdbarch, addr);
+ addr = gdbarch_addr_bits_remove (d->exp->gdbarch, addr);
annotate_display_value ();
is greater. */
if (find_pc_partial_function (pc, NULL, &func_addr, NULL))
{
- CORE_ADDR post_prologue_pc = skip_prologue_using_sal (func_addr);
+ CORE_ADDR post_prologue_pc
+ = skip_prologue_using_sal (gdbarch, func_addr);
if (post_prologue_pc != 0)
return max (pc, post_prologue_pc);
}
/* Find an upper limit on the function prologue using the debug
information. If the debug information could not be used to provide
that bound, then use an arbitrary large number as the upper bound. */
- limit_pc = skip_prologue_using_sal (pc);
+ limit_pc = skip_prologue_using_sal (gdbarch, pc);
if (limit_pc == 0)
limit_pc = pc + 100; /* Magic. */
}
/* x/i should display this line's code. */
- set_next_address (current_gdbarch, start_pc);
+ set_next_address (get_objfile_arch (sal.symtab->objfile), start_pc);
/* Repeating "info line" should do the following line. */
last_line_listed = sal.line + 1;
*bp_addr = sp - 4;
*real_pc = funcaddr;
- if (using_struct_return (NULL, value_type))
+ if (using_struct_return (gdbarch, NULL, value_type))
{
gdb_byte buf[4];
return_command (char *retval_exp, int from_tty)
{
struct frame_info *thisframe;
+ struct gdbarch *gdbarch;
struct symbol *thisfun;
struct value *return_value = NULL;
const char *query_prefix = "";
thisframe = get_selected_frame ("No selected frame.");
thisfun = get_frame_function (thisframe);
+ gdbarch = get_frame_arch (thisframe);
/* Compute the return value. If the computation triggers an error,
let it bail. If the return type can't be handled, set
occur. */
return_value = NULL;
else if (thisfun != NULL
- && using_struct_return (SYMBOL_TYPE (thisfun), return_type))
+ && using_struct_return (gdbarch,
+ SYMBOL_TYPE (thisfun), return_type))
{
query_prefix = "\
The location at which to store the function's return value is unknown.\n\
to `__main' in `main' between the prologue and before user
code. */
if (funfirstline
- && gdbarch_skip_main_prologue_p (current_gdbarch)
+ && gdbarch_skip_main_prologue_p (gdbarch)
&& SYMBOL_LINKAGE_NAME (sym)
&& strcmp (SYMBOL_LINKAGE_NAME (sym), "main") == 0)
{
- pc = gdbarch_skip_main_prologue (current_gdbarch, pc);
+ pc = gdbarch_skip_main_prologue (gdbarch, pc);
/* Recalculate the line number (might not be N+1). */
sal = find_pc_sect_line (pc, SYMBOL_OBJ_SECTION (sym), 0);
}
static void
print_msymbol_info (struct minimal_symbol *msymbol)
{
+ struct gdbarch *gdbarch = get_objfile_arch (msymbol_objfile (msymbol));
char *tmp;
- if (gdbarch_addr_bit (current_gdbarch) <= 32)
+ if (gdbarch_addr_bit (gdbarch) <= 32)
tmp = hex_string_custom (SYMBOL_VALUE_ADDRESS (msymbol)
& (CORE_ADDR) 0xffffffff,
8);
*/
int
-in_prologue (CORE_ADDR pc, CORE_ADDR func_start)
+in_prologue (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR func_start)
{
struct symtab_and_line sal;
CORE_ADDR func_addr, func_end;
if (! func_start)
return 1; /* We *might* be in a prologue. */
- prologue_end = gdbarch_skip_prologue (current_gdbarch, func_start);
+ prologue_end = gdbarch_skip_prologue (gdbarch, func_start);
return func_start <= pc && pc < prologue_end;
}
/* We don't have any good line number info, so use the minsym
information, together with the architecture-specific prologue
scanning code. */
- CORE_ADDR prologue_end = gdbarch_skip_prologue
- (current_gdbarch, func_addr);
+ CORE_ADDR prologue_end = gdbarch_skip_prologue (gdbarch, func_addr);
return func_addr <= pc && pc < prologue_end;
}
found in both ia64 and ppc). */
CORE_ADDR
-skip_prologue_using_sal (CORE_ADDR func_addr)
+skip_prologue_using_sal (struct gdbarch *gdbarch, CORE_ADDR func_addr)
{
struct symtab_and_line prologue_sal;
CORE_ADDR start_pc;
/* Get an initial range for the function. */
find_pc_partial_function (func_addr, NULL, &start_pc, &end_pc);
- start_pc += gdbarch_deprecated_function_start_offset (current_gdbarch);
+ start_pc += gdbarch_deprecated_function_start_offset (gdbarch);
prologue_sal = find_pc_line (start_pc, 0);
if (prologue_sal.line != 0)
/* symtab.c */
-extern int in_prologue (CORE_ADDR pc, CORE_ADDR func_start);
+extern int in_prologue (struct gdbarch *gdbarch,
+ CORE_ADDR pc, CORE_ADDR func_start);
-extern CORE_ADDR skip_prologue_using_sal (CORE_ADDR func_addr);
+extern CORE_ADDR skip_prologue_using_sal (struct gdbarch *gdbarch,
+ CORE_ADDR func_addr);
extern struct symbol *fixup_symbol_section (struct symbol *,
struct objfile *);
case lval_register:
{
struct frame_info *frame;
+ struct gdbarch *gdbarch;
int value_reg;
/* Figure out which frame this is in currently. */
if (!frame)
error (_("Value being assigned to is no longer active."));
-
- if (gdbarch_convert_register_p
- (current_gdbarch, VALUE_REGNUM (toval), type))
+
+ gdbarch = get_frame_arch (frame);
+ if (gdbarch_convert_register_p (gdbarch, VALUE_REGNUM (toval), type))
{
/* If TOVAL is a special machine register requiring
conversion of program values to a special raw
format. */
- gdbarch_value_to_register (current_gdbarch, frame,
+ gdbarch_value_to_register (gdbarch, frame,
VALUE_REGNUM (toval), type,
value_contents (fromval));
}
address as a hidden first parameter). */
int
-using_struct_return (struct type *func_type, struct type *value_type)
+using_struct_return (struct gdbarch *gdbarch,
+ struct type *func_type, struct type *value_type)
{
enum type_code code = TYPE_CODE (value_type);
return 0;
/* Probe the architecture for the return-value convention. */
- return (gdbarch_return_value (current_gdbarch, func_type, value_type,
+ return (gdbarch_return_value (gdbarch, func_type, value_type,
NULL, NULL, NULL)
!= RETURN_VALUE_REGISTER_CONVENTION);
}
extern int value_bit_index (struct type *type, const gdb_byte *addr,
int index);
-extern int using_struct_return (struct type *func_type,
+extern int using_struct_return (struct gdbarch *gdbarch,
+ struct type *func_type,
struct type *value_type);
extern struct value *evaluate_expression (struct expression *exp);