aboutsummaryrefslogtreecommitdiff
path: root/gdb/i386-tdep.c
AgeCommit message (Collapse)AuthorFilesLines
2002-03-19* defs.h (XMALLOC): Define.Andrew Cagney1-6/+3
* gdb-events.sh (XMALLOC): Delete macro. * gdb-events.c, gdb-events.h: Regenerate. * gdbarch.sh (XMALLOC): Delete macro. * gdbarch.c: Regenerate. * serial.c (XMALLOC): Delete macro. * ui-file.c (XMALLOC): Ditto. * ser-unix.h (XMALLOC): Ditto. * sh-tdep.c (XMALLOC): Ditto. * ui-out.c (XMALLOC): Ditto. * utils.c (XMALLOC): Ditto. * i386-tdep.c (XMALLOC): Ditto. * gdb-events.c (XMALLOC): Ditto. * d10v-tdep.c (XMALLOC): Ditto. * cli-out.c (XMALLOC): Ditto. * cli-out.c, d10v-tdep.c, gdb-events.c: Update copyright. * gdb-events.sh, i386-tdep.c, ser-unix.h, serial.c: Ditto. * ui-file.c, ui-out.c: Ditto.
2002-02-19 * i386-tdep.c (i386_gdbarch_init): Eliminate incorrect usePeter Schauer1-3/+3
of ``current_gdbarch''.
2002-02-19 * i386-tdep.c (get_longjmp_target): Fix compilation failurePierre Muller1-0/+10
by setting dummy values to JB_PC and JB_ELEMENT_SIZE if not defined.
2002-01-01* i386-tdep.h (struct gdbarch_tdep): Add `os_ident' member.Mark Kettenis1-4/+90
* i386-tdep.c: Include "elf-bfd.h". (process_note_abi_tag_sections): New function. (i386_gdbarch_init): Add code to recognize various OS/ABI combinations.
2001-12-29* i386-tdep.c (i386_push_dummy_frame): Don't write back theMark Kettenis1-1/+3
modified frame pointer until the old frame pointer has been saved.
2001-12-27* config/i386/tm-i386.h (FP7_REGNUM, FIRST_FPU_CTRL_REGNUM,Mark Kettenis1-0/+4
FCTRL_REGNUM, FPC_REGNUM, FSTAT_REGNUM, FTAG_REGNUM, FCS_REGNUM, FCOFF_REGNUM, FDS_REGNUM, FDOFF_REGNUM, FOP_REGNUM, LAST_FPU_CTRL_REGNUM, XMM0_REGNUM, XMM7_REGNUM, MXCSR_REGNUM, IS_FP_REGNUM, IS_SSE_REGNUM): Removed. (FP0_REGNUM): Define conditionally depending on HAVE_I387_REGS. (SIZEOF_FPU_CTRL_REGS): Hardcode value. * i386-tdep.h (struct gdbarch_tdep): Change such that it contains a single member `num_xmm_regs'. (FPC_REGNUM): New macro. (FIRST_FPU_REGNUM, LAST_FPU_REGNUM, FISRT_XMM_REGNUM, LAST_XMM_REGNUM, MXCSR_REGNUM, FIRST_FPU_CTRL_REGNUM, LAST_FPU_CTRL_REGNUM): Removed. (FCTRL_REGNUM, FSTAT_REGNUM, FTAG_REGNUM, FOP_REGNUM, XMM0_REGNUM, MXCSR_REGNUM): Define unconditionally. Change macros to match the comment describing the register layout. (FISEG_REGNUM, FIOFF_REGNUM, FOSEG_REGNUM, FOOFF_REGNUM): New macros. (FP_REGNUM_P, FPC_REGNUM_P, SSE_REGNUM_P): New macros. (IS_FP_REGNUM, IS_FPU_CTRL_REGNUM, IS_SSE_REGNUM): Make obsolete, unconditionally define in terms of FP_REGNUM_P, FPC_REGNUM_P and SSE_REGNUM_P). (FCS_REGNUM, FCOFF_REGNUM, FDS_REGNUM, FDOFF_REGNUM): Make obsolete, unconditionally define in terms of FISEG_REGNUM, FIOFF_REGNUM, FOSEG_REGNUM, FOOFF_REGNUM. * i386-tdep.c (i386_gdbarch_init): Initialize `num_xmm_regs' member of `struct gdbarch_tdep'. * x86-64-tdep.c (i386_gdbarch_init): Change initialization of `struct gdbarch_tdep'. * i387-nat.c (FCS_REGNUM, FCOFF_REGNUM, FDS_REGNUM, FDOFF_REGNUM): Replace with FISEG_REGNUM, FIOFF_REGNUM, FOSEG_REGNUM and FOOFF_REGNUM. Use FPC_REGNUM instead of FIRST_FPU_CTRL_REGNUM. Use XMM0_REGNUM instead of LAST_FPU_CTRL_REGNUM.
2001-12-02* i386-tdep.c (i386go32_frame_saved_pc): New function.Andrew Cagney1-0/+6
* config/i386/tm-go32.h (i386go32_frame_saved_pc): Declare. (FRAME_SAVED_PC): Redefine to i386go32_frame_saved_pc.
2001-11-18* i386-tdep.c (i386_gdbarch_init): Initialize num_regs.Andrew Cagney1-0/+4
* config/i386/tm-i386.h (NUM_REGS): Delete.
2001-11-08* i386-tdep.c (i386_gdbarch_init): Fix typo.Mark Kettenis1-1/+1
2001-11-08Enable multi-arch for i386.Andrew Cagney1-1/+40
2001-11-08Don't update ``set architecture'' when ``set disassembly-flavor[sic]''Andrew Cagney1-32/+0
2001-11-04* i386-tdep.c (i386_register_offset): Renamed fromMark Kettenis1-20/+33
i386_register_byte. Made static. (i386_register_size): Renamed from i386_register_raw_size. Made static. (i386_register_virtual_size): Removed. (i386_register_byte, i386_register_raw_size, i386_register_virtual_size): New functions. (_initialize_i386_tdep): Initialize i386_register_offset instead of i386_register_byte. Remove code to initialize i386_register_virtual_size. * config/i386/tm-i386.h (REGISTER_BYTE): Redefine to use i386_register_byte function. (REGISTER_RAW_SIZE): Redefine to use i386_register_raw_size function. (REGISTER_VIRTUAL_SIZE): Redefine to use i386_register_virtual_size function. (i386_register_byte, i386_register_raw_size, i386_register_virtual_size): New functions.
2001-10-31* config/i386/tm-i386.h (REGISTER_NAMES): Remove.Mark Kettenis1-0/+30
(REGISTER_NAME): New define. (i386_register_name): New prototype. * i386-tdep.c (i386_register_names): New variable. (i386_register_name): New function. * config/i386/tm-i386os9k.h, config/i386/tm-ptx.h, config/i386/tm-symmetry.h: Undefine REGISTER_NAME instead of REGISTER_NAMES.
2001-10-29* i386-tdep.c (i386_extract_return_value): UseMark Kettenis1-56/+32
convert_typed_floating to extract floating-point value from register buffer. (i386_store_return_value): Use convert_typed_floating to store floating-point return balue in register buffer (i386_register_virtual_type): Change type of floating-point registers to builtin_type_i387_ext. (i386_register_convert_to_virtual): Use convert_typed_floating to do the conversion. (i386_register_convert_to_raw): Likewise.
2001-10-21Add explicit #include of "value.h".Andrew Cagney1-0/+1
2001-08-01* defs.h (HOST_FLOAT_FORMAT, HOST_DOUBLE_FORMAT)Andrew Cagney1-0/+1
(HOST_FLOAT_FORMAT, HOST_DOUBLE_FORMAT) (HOST_LONG_DOUBLE_FORMAT, DOUBLEST) (floatformat_to_doublest, floatformat_from_doublest) (floatformat_is_negative, floatformat_is_nan) (floatformat_mantissa, store_floating) (extract_floating): Move declaration from here. * doublest.h: To here. New file. * utils.c (get_field, floatformat_to_doublest, put_field) (ldfrexp, floatformat_from_doublest, floatformat_is_negative) (floatformat_is_nan, floatformat_mantissa) (FLOATFORMAT_CHAR_BIT): Move from here. * doublest.c: To here. New file. * findvar.c (store_floating, extract_floating): Move from here. * doublest.c: To here. * Makefile.in (SFILES): Add doublest.c. (COMMON_OBS): Add doublest.o. (doublest.o): Specify dependencies. (doublest_h): Define. * config/m88k/tm-m88k.h: Include "doublest.h". * config/i960/tm-i960.h: Ditto. * config/i386/tm-symmetry.h: Ditto. * rs6000-tdep.c, valarith.c: Ditto. * valprint.c, stabsread.c, sh-tdep.c: Ditto. * ia64-tdep.c, i387-tdep.c, i386-tdep.c: Ditto. * values.c, arm-tdep.c, arm-linux-tdep.c: Ditto. * alpha-tdep.c, ax.h, expression.h: Ditto. * sh-tdep.c, parse.c, top.c, value.h: Ditto. * Makefile.in (arm-tdep.o): Add $(doublest_h). (i386-tdep.o, i387-tdep.o, ia64-tdep.o): Ditto. (rs6000-tdep.o, stabsread.o, valarith.o): Ditto. (values.o, valprint.o, arm-linux-tdep.o): Ditto. (alpha-tdep.o, ax_h, parse.o, top.o, value_h): Ditto. (parser_defs_h): Ditto. (expression_h): Add $(doublest_h) and $(symtab_h).
2001-07-30* i386-tdep.c (i386_register_convert_to_virtual): ReplaceMark Kettenis1-1/+7
assertion with a warning if we're asked to convert towards a non-floating-point type. Zero out the the buffer where the data is supposed to be stored in that case.
2001-07-28* config/i386/tm-i386.h (STAB_REG_TO_REGNUM, SDB_REG_TO_REGNUM,Mark Kettenis1-0/+62
DWARF_REG_TO_REGNUM, DWARF2_REG_TO_REGNUM): New defines. (i386_stab_reg_to_regnum, i386_dwarf_reg_to_regnum): New prototypes. * config/i386/tm-fbsd.h, config/i386/tm-i386gnu.h, config/i386/tm-linux.h (STAB_REG_TO_REGNUM): Redefine to call i386_dwarf_reg_to_regnum. * i386-tdep.c (i386_stab_reg_to_regnum, i386_dwarf_reg_to_regnum): New functions.
2001-07-28* i386-tdep.c: Include "gdb_assert.h"Mark Kettenis1-8/+22
(i386_register_convert_to_virtual): Fix such that it can handle conversion to any floating-point type. Assert that we are dealing with a floating-point first. (i386_register_convert_to_raw): Assert that TYPE is a floating-point type with length 12.
2001-07-15s/value_ptr/struct value */Andrew Cagney1-2/+2
2001-07-12* i386-tdep.c (i386_extract_return_value): Undo 2001-07-11 changesMark Kettenis1-8/+13
to comment. (i386_store_return_value): Improve comments about storing floating-point return values.
2001-07-11* i386-tdep.c (i386_extract_return_value): "Fix" comment.Mark Kettenis1-1/+14
(i386_store_return_value): Frob FPU status and tag word to make sure the return value is the only value on the FPU stack.
2001-05-09* i386-tdep.c (i386_frame_saved_pc): New function.Mark Kettenis1-0/+17
* config/i386/tm-i386.h (FRAME_SAVED_PC): Redefine in terms of i386_frame_saved_pc. (i386_frame_saved_pc): New prototype.
2001-05-09* i386-tdep.c (i386_register_virtual_type): New function.Mark Kettenis1-0/+31
(i386_register_convertible): New function. * config/i386/tm-i386.h (REGISTER_VIRTUAL_TYPE): Redefine in terms of i386_register_virtual_type. (REGISTER_CONVERTIBLE): Redefine in terms of i386_register_convertible. (i386_register_virtual_type, i386_register_convertible): New prototypes.
2001-04-19* i386-tdep.c (i386_frameless_function_invocation): New function.Mark Kettenis1-0/+13
* config/i386/tm-i386.h (FRAMELESS_FUNCTION_INVOCATION): Redefine in terms of i386_frameless_function_invocation. Adjust comment. (i386_frameless_function_invocation): New prototype.
2001-04-17* i386-tdep.c (i386_saved_pc_after_call): New function.Mark Kettenis1-0/+8
* config/i386/tm-i386.h (SAVED_PC_AFTER_CALL): Redefine in terms of i386_saved_pc_after_call. (i386_saved_pc_after_call): New prototype.
2001-04-16* i386-tdep.c (i386_frame_chain): New function.Mark Kettenis1-0/+16
* config/i386/tm-i386.h (FRAME_CHAIN): Redefine in terms of i386_frame_chain. (i386_frame_chain): New prototype.
2001-04-04* i386-tdep.c (i386_extract_return_value): Don't return the returnMark Kettenis1-3/+8
value of a void function. (i386_store_return_value): Likewise.
2001-04-01* i386-tdep.c (i386_extract_struct_value_address): New function.Mark Kettenis1-0/+11
* 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.
2001-03-31* i386-tdep.c (i386_extract_return_value): If the type of theMark Kettenis1-2/+11
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.
2001-03-26* i386-tdep.c (i386_push_arguments, i386_store_struct_return): NewMark Kettenis1-0/+24
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.
2001-03-21* i386-tdep.c: Add back _initialize_i386_tdep prototype withMark Kettenis1-0/+3
appropriate comment.
2001-03-17* i386-tdep.c: Fix formatting.Mark Kettenis1-220/+206
(i386_get_frame_setup, i386_follow_jump, codestream_read, codestream_seek, codestream_fill, skip_trampoline_code, gdb_print_insn_i386, _initialize_i386_tdep): Remove redundant prototypoes.
2001-03-06Update/correct copyright notices.Kevin Buettner1-1/+2
2001-03-01Create new file regcache.h. Update all uses.Andrew Cagney1-0/+1
2001-02-25Replace calls to abort() with calls to internal_error().Kevin Buettner1-1/+1
2001-02-08Add __FILE__ and __LINE__ parameter to internal_error() /Andrew Cagney1-3/+5
internal_verror().
2000-12-21* i386-tdep.c: Add missing ')' in comment.Mark Kettenis1-1/+60
(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.
2000-07-30Protoization.Kevin Buettner1-36/+19
2000-06-12* config/i386/tm-i386.h: Add forward declaration of `struct value'.Mark Kettenis1-0/+20
(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.
2000-06-08Change signature of function add_set_enum_cmd() so that it usesAndrew Cagney1-4/+4
constant character pointers. Update everything. As a consequence fix infrun's follow-fork plugging a small memory leak.
2000-06-07The attatched moves the remaining guff from gdbarch.{h,c,sh} toAndrew Cagney1-0/+1
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.
2000-05-28PARAMS removal.Kevin Buettner1-10/+11
2000-05-16Fix signature of add_set_enum_cmd. Change VAR parameter to char**.Andrew Cagney1-1/+1
Cleanup signature of add_set_cmd. Change VAR parameter to void*.
2000-03-262000-03-26 Mark Kettenis <kettenis@gnu.org>Mark Kettenis1-0/+26
Provide `long double' support for most i386 targets. * config/i386/tm-i386.h (TARGET_LONG_DOUBLE_FORMAT): Define as &floatformat_i387_ext. (TARGET_LONG_DOUBLE_BITS): Define as 96. (REGISTER_VIRTUAL_TYPE): Change type for FPU registers to `builtin_type_long_double'. (REGISTER_CONVERT_TO_VIRTUAL): Call i386_register_convert_to_virtual. (REGISTER_CONVERT_TO_RAW): Call i386_register_convert_to_raw. (i387_to_double, double_to_i387): Remove prototypes. (i386_extract_return_value): Change prototype to match definition in i386-tdep.c. * config/i386/tm-i386mk.h (TARGET_LONG_DOUBLE_FORMAT): #undef. (TARGET_LONG_DOUBLE_BITS): #undef. * config/i386/tm-linux.h (TARGET_LONG_DOUBLE_BIT): Remove. [HAVE_LONG_DOUBLE && HOST_I386] (LD_I387): Remove. (i387_extract_floating, i387_store_floating): Remove prototypes. (TARGET_EXTRACT_FLOATING, TARGET_STORE_FLOATING): Remove. (REGISTER_CONVERT_TO_VIRTUAL, REGOISTER_CONVERT_TO_RAW): Remove. (REGISTER_VIRTUAL_TYPE): Remove. * i386-tdep.c (i386_register_convert_to_virtual): New function. (i386_register_convert_to_raw): New function. * i387-tdep.c [LD_I387] (i387_extract_floating): Remove. (i387_store_floating): Remove.
2000-03-222000-03-22 Mark Kettenis <kettenis@gnu.org>Mark Kettenis1-33/+43
* 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.
2000-03-16* i386-tdep.c (LINUX_SIGTRAMP_INSN0, LINUX_SIGTRAMP_OFFSET0,Jim Blandy1-257/+0
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.
2000-03-082000-03-08 Mark Kettenis <kettenis@gnu.org>Mark Kettenis1-0/+11
* i386-tdep.c (i386_linux_saved_pc_after_call): New function. * config/i386/tm-linux.h (SAVED_PC_AFTER_CALL): Define to call i386_linux_saved_pc_after_call.
2000-03-042000-03-04 Mark Kettenis <kettenis@gnu.org>Mark Kettenis1-34/+147
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.
2000-02-29From J.T.: Convert i386 to updated frame_saved_regs.Andrew Cagney1-11/+13