mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-21 01:12:32 +08:00
2002-03-22 Elena Zannoni <ezannoni@redhat.com>
* ppc-linux-tdep.c (ppc_sysv_abi_use_struct_convention): New function. * ppc-tdep.h (ppc_sysv_abi_use_struct_convention): Export. * rs6000-tdep.c (rs6000_gdbarch_init): Use different structure returning convention for SYSV ABI case, but not for GNU/Linux, FreeBSD, or NetBSD.
This commit is contained in:
parent
3121eff097
commit
8e0662df17
@ -1,3 +1,12 @@
|
|||||||
|
2002-03-22 Elena Zannoni <ezannoni@redhat.com>
|
||||||
|
|
||||||
|
* ppc-linux-tdep.c (ppc_sysv_abi_use_struct_convention): New
|
||||||
|
function.
|
||||||
|
* ppc-tdep.h (ppc_sysv_abi_use_struct_convention): Export.
|
||||||
|
* rs6000-tdep.c (rs6000_gdbarch_init): Use different
|
||||||
|
structure returning convention for SYSV ABI case, but not
|
||||||
|
for GNU/Linux, FreeBSD, or NetBSD.
|
||||||
|
|
||||||
2002-03-22 Daniel Jacobowitz <drow@mvista.com>
|
2002-03-22 Daniel Jacobowitz <drow@mvista.com>
|
||||||
|
|
||||||
* symtab.h (lookup_block_symbol): Add mangled_name argument
|
* symtab.h (lookup_block_symbol): Add mangled_name argument
|
||||||
|
@ -414,6 +414,14 @@ ppc_linux_frame_chain (struct frame_info *thisframe)
|
|||||||
it may be used generically by ports which use either the SysV ABI or
|
it may be used generically by ports which use either the SysV ABI or
|
||||||
the EABI */
|
the EABI */
|
||||||
|
|
||||||
|
/* Structures 8 bytes or less long are returned in the r3 & r4
|
||||||
|
registers, according to the SYSV ABI. */
|
||||||
|
int
|
||||||
|
ppc_sysv_abi_use_struct_convention (int gcc_p, struct type *value_type)
|
||||||
|
{
|
||||||
|
return (TYPE_LENGTH (value_type) > 8);
|
||||||
|
}
|
||||||
|
|
||||||
/* round2 rounds x up to the nearest multiple of s assuming that s is a
|
/* round2 rounds x up to the nearest multiple of s assuming that s is a
|
||||||
power of 2 */
|
power of 2 */
|
||||||
|
|
||||||
|
@ -31,6 +31,7 @@ void ppc_linux_init_extra_frame_info (int fromleaf, struct frame_info *);
|
|||||||
int ppc_linux_frameless_function_invocation (struct frame_info *);
|
int ppc_linux_frameless_function_invocation (struct frame_info *);
|
||||||
void ppc_linux_frame_init_saved_regs (struct frame_info *);
|
void ppc_linux_frame_init_saved_regs (struct frame_info *);
|
||||||
CORE_ADDR ppc_linux_frame_chain (struct frame_info *);
|
CORE_ADDR ppc_linux_frame_chain (struct frame_info *);
|
||||||
|
int ppc_sysv_abi_use_struct_convention (int, struct type *);
|
||||||
CORE_ADDR ppc_sysv_abi_push_arguments (int, struct value **, CORE_ADDR, int,
|
CORE_ADDR ppc_sysv_abi_push_arguments (int, struct value **, CORE_ADDR, int,
|
||||||
CORE_ADDR);
|
CORE_ADDR);
|
||||||
int ppc_linux_memory_remove_breakpoint (CORE_ADDR addr, char *contents_cache);
|
int ppc_linux_memory_remove_breakpoint (CORE_ADDR addr, char *contents_cache);
|
||||||
|
@ -2563,8 +2563,6 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
|||||||
set_gdbarch_store_struct_return (gdbarch, rs6000_store_struct_return);
|
set_gdbarch_store_struct_return (gdbarch, rs6000_store_struct_return);
|
||||||
set_gdbarch_store_return_value (gdbarch, rs6000_store_return_value);
|
set_gdbarch_store_return_value (gdbarch, rs6000_store_return_value);
|
||||||
set_gdbarch_extract_struct_value_address (gdbarch, rs6000_extract_struct_value_address);
|
set_gdbarch_extract_struct_value_address (gdbarch, rs6000_extract_struct_value_address);
|
||||||
set_gdbarch_use_struct_convention (gdbarch, generic_use_struct_convention);
|
|
||||||
|
|
||||||
set_gdbarch_pop_frame (gdbarch, rs6000_pop_frame);
|
set_gdbarch_pop_frame (gdbarch, rs6000_pop_frame);
|
||||||
|
|
||||||
set_gdbarch_skip_prologue (gdbarch, rs6000_skip_prologue);
|
set_gdbarch_skip_prologue (gdbarch, rs6000_skip_prologue);
|
||||||
@ -2576,6 +2574,27 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
|||||||
/* Not sure on this. FIXMEmgo */
|
/* Not sure on this. FIXMEmgo */
|
||||||
set_gdbarch_frame_args_skip (gdbarch, 8);
|
set_gdbarch_frame_args_skip (gdbarch, 8);
|
||||||
|
|
||||||
|
/* Until November 2001, gcc was not complying to the SYSV ABI for
|
||||||
|
returning structures less than or equal to 8 bytes in size. It was
|
||||||
|
returning everything in memory. When this was corrected, it wasn't
|
||||||
|
fixed for native platforms. */
|
||||||
|
if (sysv_abi)
|
||||||
|
{
|
||||||
|
if (osabi == ELFOSABI_LINUX
|
||||||
|
|| osabi == ELFOSABI_NETBSD
|
||||||
|
|| osabi == ELFOSABI_FREEBSD)
|
||||||
|
set_gdbarch_use_struct_convention (gdbarch,
|
||||||
|
generic_use_struct_convention);
|
||||||
|
else
|
||||||
|
set_gdbarch_use_struct_convention (gdbarch,
|
||||||
|
ppc_sysv_abi_use_struct_convention);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
set_gdbarch_use_struct_convention (gdbarch,
|
||||||
|
generic_use_struct_convention);
|
||||||
|
}
|
||||||
|
|
||||||
set_gdbarch_frame_chain_valid (gdbarch, file_frame_chain_valid);
|
set_gdbarch_frame_chain_valid (gdbarch, file_frame_chain_valid);
|
||||||
if (osabi == ELFOSABI_LINUX)
|
if (osabi == ELFOSABI_LINUX)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user