mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-28 07:08:01 +08:00
* arch-utils.c (always_use_struct_convention): New function.
* arch-utils.h (always_use_struct_convention): New prototype. * alpha-tdep.c (alpha_use_struct_convention): Delete. (alpha_gdbarch_init): Register always_use_struct_convention, instead of alpha_use_struct_convention. * cris-tdep.c (cris_use_struct_convention): Delete. (cris_gdbarch_init): Register always_use_struct_convention, instead of cris_use_struct_convention. * frv-tdep.c (frv_use_struct_convention): Delete. (frv_gdbarch_init): Register always_use_struct_convention, instead of frv_use_struct_convention. * h8300-tdep.c (h8300_use_struct_convention): Delete. (h8300_gdbarch_init): Register always_use_struct_convention, instead of h8300_use_struct_convention. * mips_o32-tdep.c (mips_o32_use_struct_convention): Delete. (mips_o32_gdbarch_init): Register always_use_struct_convention, instead of mips_o32_use_struct_convention.
This commit is contained in:
@ -1,3 +1,23 @@
|
||||
2003-06-12 Jim Blandy <jimb@redhat.com>
|
||||
|
||||
* arch-utils.c (always_use_struct_convention): New function.
|
||||
* arch-utils.h (always_use_struct_convention): New prototype.
|
||||
* alpha-tdep.c (alpha_use_struct_convention): Delete.
|
||||
(alpha_gdbarch_init): Register always_use_struct_convention,
|
||||
instead of alpha_use_struct_convention.
|
||||
* cris-tdep.c (cris_use_struct_convention): Delete.
|
||||
(cris_gdbarch_init): Register always_use_struct_convention,
|
||||
instead of cris_use_struct_convention.
|
||||
* frv-tdep.c (frv_use_struct_convention): Delete.
|
||||
(frv_gdbarch_init): Register always_use_struct_convention,
|
||||
instead of frv_use_struct_convention.
|
||||
* h8300-tdep.c (h8300_use_struct_convention): Delete.
|
||||
(h8300_gdbarch_init): Register always_use_struct_convention,
|
||||
instead of h8300_use_struct_convention.
|
||||
* mips_o32-tdep.c (mips_o32_use_struct_convention): Delete.
|
||||
(mips_o32_gdbarch_init): Register always_use_struct_convention,
|
||||
instead of mips_o32_use_struct_convention.
|
||||
|
||||
2003-06-12 Andrew Cagney <cagney@redhat.com>
|
||||
|
||||
* wince.c: Include "mips-tdep.h".
|
||||
|
@ -579,13 +579,6 @@ alpha_store_return_value (struct type *valtype, struct regcache *regcache,
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
alpha_use_struct_convention (int gcc_p, struct type *type)
|
||||
{
|
||||
/* Structures are returned by ref in extra arg0. */
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
static const unsigned char *
|
||||
alpha_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
|
||||
@ -1540,7 +1533,7 @@ alpha_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
||||
set_gdbarch_frameless_function_invocation (gdbarch,
|
||||
generic_frameless_function_invocation_not);
|
||||
|
||||
set_gdbarch_use_struct_convention (gdbarch, alpha_use_struct_convention);
|
||||
set_gdbarch_use_struct_convention (gdbarch, always_use_struct_convention);
|
||||
set_gdbarch_extract_return_value (gdbarch, alpha_extract_return_value);
|
||||
set_gdbarch_store_return_value (gdbarch, alpha_store_return_value);
|
||||
set_gdbarch_extract_struct_value_address (gdbarch,
|
||||
|
@ -72,6 +72,13 @@ legacy_store_return_value (struct type *type, struct regcache *regcache,
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
always_use_struct_convention (int gcc_p, struct type *value_type)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
legacy_register_sim_regno (int regnum)
|
||||
{
|
||||
|
@ -43,6 +43,10 @@ extern gdbarch_extract_return_value_ftype legacy_extract_return_value;
|
||||
/* Implementation of store return value that grubs the register cache. */
|
||||
extern gdbarch_store_return_value_ftype legacy_store_return_value;
|
||||
|
||||
/* To return any structure or union type by value, store it at the
|
||||
address passed as an invisible first argument to the function. */
|
||||
extern gdbarch_use_struct_convention_ftype always_use_struct_convention;
|
||||
|
||||
/* Frameless functions not identifable. */
|
||||
extern gdbarch_frameless_function_invocation_ftype generic_frameless_function_invocation_not;
|
||||
|
||||
|
@ -1100,19 +1100,6 @@ cris_extract_struct_value_address (char *regbuf)
|
||||
return struct_return_address;
|
||||
}
|
||||
|
||||
/* Returns 1 if a value of the given type being returned from a function
|
||||
must have space allocated for it on the stack. gcc_p is true if the
|
||||
function being considered is known to have been compiled by GCC.
|
||||
In the CRIS ABI, structure return values are passed to the called
|
||||
function by reference in register R9 to a caller-allocated area, so
|
||||
this is always true. */
|
||||
|
||||
static int
|
||||
cris_use_struct_convention (int gcc_p, struct type *type)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Returns 1 if the given type will be passed by pointer rather than
|
||||
directly. */
|
||||
|
||||
@ -4278,7 +4265,7 @@ cris_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
||||
set_gdbarch_deprecated_store_struct_return (gdbarch, cris_store_struct_return);
|
||||
set_gdbarch_deprecated_extract_struct_value_address
|
||||
(gdbarch, cris_extract_struct_value_address);
|
||||
set_gdbarch_use_struct_convention (gdbarch, cris_use_struct_convention);
|
||||
set_gdbarch_use_struct_convention (gdbarch, always_use_struct_convention);
|
||||
|
||||
set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, cris_frame_init_saved_regs);
|
||||
set_gdbarch_deprecated_init_extra_frame_info (gdbarch, cris_init_extra_frame_info);
|
||||
|
@ -738,18 +738,6 @@ frv_frame_init_saved_regs (struct frame_info *frame)
|
||||
}
|
||||
}
|
||||
|
||||
/* Should we use EXTRACT_STRUCT_VALUE_ADDRESS instead of
|
||||
EXTRACT_RETURN_VALUE? GCC_P is true if compiled with gcc
|
||||
and TYPE is the type (which is known to be struct, union or array).
|
||||
|
||||
The frv returns all structs in memory. */
|
||||
|
||||
static int
|
||||
frv_use_struct_convention (int gcc_p, struct type *type)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void
|
||||
frv_extract_return_value (struct type *type, char *regbuf, char *valbuf)
|
||||
{
|
||||
@ -1079,7 +1067,7 @@ frv_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
||||
|
||||
set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, frv_frame_init_saved_regs);
|
||||
|
||||
set_gdbarch_use_struct_convention (gdbarch, frv_use_struct_convention);
|
||||
set_gdbarch_use_struct_convention (gdbarch, always_use_struct_convention);
|
||||
set_gdbarch_deprecated_extract_return_value (gdbarch, frv_extract_return_value);
|
||||
|
||||
set_gdbarch_deprecated_store_struct_return (gdbarch, frv_store_struct_return);
|
||||
|
@ -1058,12 +1058,6 @@ h8300_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
|
||||
write_register (0, addr);
|
||||
}
|
||||
|
||||
static int
|
||||
h8300_use_struct_convention (int gcc_p, struct type *type)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
static CORE_ADDR
|
||||
h8300_extract_struct_value_address (char *regbuf)
|
||||
{
|
||||
@ -1227,7 +1221,7 @@ h8300_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
||||
h8300_store_return_value);
|
||||
set_gdbarch_deprecated_extract_struct_value_address
|
||||
(gdbarch, h8300_extract_struct_value_address);
|
||||
set_gdbarch_use_struct_convention (gdbarch, h8300_use_struct_convention);
|
||||
set_gdbarch_use_struct_convention (gdbarch, always_use_struct_convention);
|
||||
set_gdbarch_deprecated_call_dummy_words (gdbarch, call_dummy_words);
|
||||
set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, 0);
|
||||
set_gdbarch_breakpoint_from_pc (gdbarch, h8300_breakpoint_from_pc);
|
||||
|
@ -768,12 +768,6 @@ mips_n32n64_use_struct_convention (int gcc_p, struct type *type)
|
||||
return (TYPE_LENGTH (type) > 2 * MIPS_SAVED_REGSIZE);
|
||||
}
|
||||
|
||||
static int
|
||||
mips_o32_use_struct_convention (int gcc_p, struct type *type)
|
||||
{
|
||||
return 1; /* Structures are returned by ref in extra arg0. */
|
||||
}
|
||||
|
||||
/* Should call_function pass struct by reference?
|
||||
For each architecture, structs are passed either by
|
||||
value or by reference, depending on their size. */
|
||||
@ -5778,7 +5772,7 @@ mips_gdbarch_init (struct gdbarch_info info,
|
||||
set_gdbarch_reg_struct_has_addr (gdbarch,
|
||||
mips_o32_reg_struct_has_addr);
|
||||
set_gdbarch_use_struct_convention (gdbarch,
|
||||
mips_o32_use_struct_convention);
|
||||
always_use_struct_convention);
|
||||
break;
|
||||
case MIPS_ABI_O64:
|
||||
set_gdbarch_push_dummy_call (gdbarch, mips_o64_push_dummy_call);
|
||||
|
Reference in New Issue
Block a user