* config/i386/tm-i386.h (FRAMELESS_FUNCTION_INVOCATION): Redefine
in terms of i386_frameless_function_invocation. Adjust comment.
(i386_frameless_function_invocation): New prototype.
* config/i386/tm-i386.h (EXTRACT_STRUCT_VALUE_ADDRESS): Redefine
in terms of i386_extract_struct_value_address.
(i386_extract_struct_value_address): New prototype.
return value is TYPE_STRUCT and the number of fields is one, call
ourselves with TYPE set tp the type of the first field.
(i386_store_return_value): Likewise.
This fixes a problem with returning structs consisting of a single
`float' or `double' on *BSD.
functions.
* config/i386/tm-i386.h (PUSH_ARGUMENTS): New macro.
(STORE_STRUCT_RETURN): Redefine in terms of
i386_store_struct_return.
(i386_push_arguments, i386_store_struct_return): New prototypes.
* config/i386/tm-i386v.h (STORE_STRUCT_RETURN): Remove. It's
definition was identical to the definition in "i386/tm-i386.h" so
the new definition should suffice too.
(i386_extract_return_value): Return directly after issuing the
warning and filling *VALBUF with zeroes if we cannot get at the
floating-point registers.
(i386_store_return_value): New function.
* config/i386/tm-i386.h (STORE_RETURN_VALUE): Simply call
i386_store_return_value.
Add prototype for i386_store_return_value.
(FIX_CALL_DUMMY): Redefined to call i386_fix_call_dummy.
(i386_fix_call_dummy): Add prototype.
* i386-tdep.c (i386_fix_call_dummy): New function based on the
code from the old FIX_CALL_DUMMY macro.
arch-utils.{h,c}. The ``set architecutre'' and ``set endian''
commands (part of the move) were implemented to use add_set_enum_cmd()
so that ``set architecture <tab>'' works.
* config/i386/tm-i386aix.h (I386_AIX_TARGET): Remove.
* config/i386/tm-linux.h (LOW_RETURN_REGNUM, HIGH_RETURN_REGNUM):
Remove
* i386-tdep.c (LOW_RETURN_REGNUM, HIGH_RETURN_REGNUM): New defines.
(i386_extract_return_value): Rewritten. Correctly support all
floating-point types and large integer types on targets that use
the standard i386 GDB register layout and return floating-point
values in the FPU.
LINUX_SIGTRAMP_INSN1, LINUX_SIGTRAMP_OFFSET1,
LINUX_SIGTRAMP_INSN2, LINUX_SIGTRAMP_OFFSET2, linux_sigtramp_code,
LINUX_SIGTRAMP_LEN, i386_linux_sigtramp_start,
LINUX_RT_SIGTRAMP_INSN0, LINUX_RT_SIGTRAMP_OFFSET0,
LINUX_RT_SIGTRAMP_INSN1, LINUX_RT_SIGTRAMP_OFFSET1,
linux_rt_sigtramp_code, LINUX_RT_SIGTRAMP_LEN,
i386_linux_rt_sigtramp_start, i386_linux_in_sigtramp,
i386_linux_sigcontext_addr, LINUX_SIGCONTEXT_PC_OFFSET,
i386_linux_sigtramp_saved_pc, LINUX_SIGCONTEXT_SP_OFFSET,
i386_linux_sigtramp_saved_sp): Deleted. These all implement
Linux-specific signal trampoline detection, and should be moved to...
* i386-linux-nat.c: ... here.
* config/i386/tm-linux.h (I386_LINUX_SIGTRAMP): No need to define
this any more, since we're not enabling OS-specific code in a
OS-independent file.
Fix support for Linux/i386 signal trampolines. The old approach
didn't work for Linux 2.2 and beyond, and didn't work with recent
versions of the GNU C library.
* i386-tdep.c (LINUX_RT_SIGTRAMP_INSN0, LINUX_RT_SIGTRAMP_OFFSET0,
LINUX_RT_SIGTRAMP_INSN1, LINUX_RT_SIGTRAMP_OFFSET1): New defines.
(linux_rt_sigtramp_code): New variable.
(LINUX_RT_SIGTRAMP_LEN): New define.
(i386_linux_rt_sigtramp_start): New function. Detect start of
signal trampolines for RT signals.
(i386_linux_sigtramp): Removed.
(i386_linux_in_sigtramp): New function.
(i386_linux_sigcontext_addr): New function. Recognize the names
of the signal tranmpolines used by recent versions of the GNU C
library, and add support for RT signals.
(LINUX_SIGCONTEXT_PC_OFFSET, LINUX_SIGCONTEXT_SP_OFFSET): New
defines. Moved here from config/i386/tm-linux.h.
(i386_linux_sigtramp_saved_pc, i386_linux_sigtramp_saved_sp):
Reimplement in terms of i386_linux_sigcontext_addr.
* config/i386/tm-linux.h (LINUX_SIGCONTEXT_SIZE): Removed.
(LINUX_SIGCONTEXT_PC_OFFSET, LINUX_SIGCONTEXT_SP_OFFSET):
Moved to i386-tdep.c.
(IN_SIGTRAMP): Redefine to call i386_linux_in_sigtramp.
FRAME_CHAIN, FRAMELESS_FUNCTION_INVOCATION, FRAME_SAVED_PC):
Define to make backtracing through the various sigtramp handlers
work.
* i386-tdep.c (i386v4_sigtramp_saved_pc): New routine to fetch
the saved pc from ucontext on the stack for SVR4 signal handling.
({extract,store}_{signed_integer,unsigned_integer,address}):
New routines to replace SWAP_TARGET_AND_HOST.
All over: All uses of SWAP_TARGET_AND_HOST on integers replaced.
symtab.h, tm-i386v4.h, valprint.c, values.c: Lint.
* breakpoint.c, c-exp.y, coffread.c, command.c, environ.c, eval.c,
findvar.c, infcmd.c, infptrace.c, infrun.c, m2-exp.y, parse.c,
putenv.c, solib.c, sparc-xdep.c, symtab.c, tm-i386v.h, tm-sparc.h,
utils.c, valarith.c, valops.c, valprint.c, values.c:
Replace bcopy() use with memcpy(), which is more standard and can
take advantage of gcc's builtin functions for increased performance.
* breakpoint.c, buildsym.c, coffread.c, dbxread.c, i386-tdep.c,
ieee-float.c, infcmd.c, sparc-tdep.c, stack.c, symtab.c, symtab.h,
target.c, values.c:
Replace bzero() use with memset(), which is more standard and can
take advantage of gcc's builtin functions for increased performance.
* i386-tdep.c, main.c, valprint.c:
Replace bcmp() use with memcmp(), which is more standard and can
take advantage of gcc's builtin functions for increased performance.