Commit Graph

63 Commits

Author SHA1 Message Date
Andrew Cagney d16aafd8c8 * defs.h (HOST_FLOAT_FORMAT, HOST_DOUBLE_FORMAT)
(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-08-01 18:39:27 +00:00
Mark Kettenis 8d7f6b4a80 * i386-tdep.c (i386_register_convert_to_virtual): Replace
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-30 21:09:44 +00:00
Mark Kettenis 85540d8c4a * config/i386/tm-i386.h (STAB_REG_TO_REGNUM, SDB_REG_TO_REGNUM,
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 17:03:38 +00:00
Mark Kettenis 3d2615808f * i386-tdep.c: Include "gdb_assert.h"
(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-28 16:48:59 +00:00
Andrew Cagney ea7c478fe2 s/value_ptr/struct value */ 2001-07-15 20:10:02 +00:00
Mark Kettenis 635b0cc19c * i386-tdep.c (i386_extract_return_value): Undo 2001-07-11 changes
to comment.
(i386_store_return_value): Improve comments about storing
floating-point return values.
2001-07-12 18:50:01 +00:00
Mark Kettenis ccb945b81e * i386-tdep.c (i386_extract_return_value): "Fix" comment.
(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-07-11 08:43:41 +00:00
Mark Kettenis 0d17c81d95 * i386-tdep.c (i386_frame_saved_pc): New function.
* 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 16:16:33 +00:00
Mark Kettenis d7a0d72c95 * i386-tdep.c (i386_register_virtual_type): New function.
(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-05-09 09:58:45 +00:00
Mark Kettenis 539ffe0b42 * i386-tdep.c (i386_frameless_function_invocation): New function.
* 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-19 11:39:48 +00:00
Mark Kettenis ed84f6c149 * i386-tdep.c (i386_saved_pc_after_call): New function.
* 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-17 23:20:55 +00:00
Mark Kettenis c833a37e77 * i386-tdep.c (i386_frame_chain): New function.
* config/i386/tm-i386.h (FRAME_CHAIN): Redefine in terms of
i386_frame_chain.
(i386_frame_chain): New prototype.
2001-04-16 13:03:15 +00:00
Mark Kettenis 3df1b9b49d * i386-tdep.c (i386_extract_return_value): Don't return the return
value of a void function.
(i386_store_return_value): Likewise.
2001-04-04 15:09:46 +00:00
Mark Kettenis f7af964784 * i386-tdep.c (i386_extract_struct_value_address): New function.
* 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-04-01 12:39:52 +00:00
Mark Kettenis 1e8d0a7b55 * i386-tdep.c (i386_extract_return_value): If the type of the
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-31 13:05:16 +00:00
Mark Kettenis 22f8ba5774 * i386-tdep.c (i386_push_arguments, i386_store_struct_return): New
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-26 12:11:14 +00:00
Mark Kettenis 28e9e0f00d * i386-tdep.c: Add back _initialize_i386_tdep prototype with
appropriate comment.
2001-03-21 11:22:24 +00:00
Mark Kettenis fc3389707e * i386-tdep.c: Fix formatting.
(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-17 22:28:33 +00:00
Kevin Buettner b6ba6518e9 Update/correct copyright notices. 2001-03-06 08:22:02 +00:00
Andrew Cagney 4e052eda91 Create new file regcache.h. Update all uses. 2001-03-01 01:39:22 +00:00
Kevin Buettner e1e9e218c1 Replace calls to abort() with calls to internal_error(). 2001-02-25 04:45:12 +00:00
Andrew Cagney 8e65ff28b0 Add __FILE__ and __LINE__ parameter to internal_error() /
internal_verror().
2001-02-08 06:03:54 +00:00
Mark Kettenis ef9dff19c4 * i386-tdep.c: Add missing ')' in comment.
(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-12-21 20:52:59 +00:00
Kevin Buettner fba45db2fa Protoization. 2000-07-30 01:48:28 +00:00
Mark Kettenis a7769679c2 * config/i386/tm-i386.h: Add forward declaration of `struct 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.
2000-06-12 01:44:35 +00:00
Andrew Cagney 53904c9e67 Change signature of function add_set_enum_cmd() so that it uses
constant character pointers.  Update everything.
As a consequence fix infrun's follow-fork plugging a small memory leak.
2000-06-08 00:52:56 +00:00
Andrew Cagney b4a2023990 The attatched moves the remaining guff from gdbarch.{h,c,sh} to
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-06-07 04:38:02 +00:00
Kevin Buettner a14ed312fd PARAMS removal. 2000-05-28 01:12:42 +00:00
Andrew Cagney 1ed2a1352d Fix signature of add_set_enum_cmd. Change VAR parameter to char**.
Cleanup signature of add_set_cmd.  Change VAR parameter to void*.
2000-05-16 03:03:13 +00:00
Mark Kettenis ac27f131b2 2000-03-26 Mark Kettenis <kettenis@gnu.org>
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-26 21:21:50 +00:00
Mark Kettenis 1a309862a7 2000-03-22 Mark Kettenis <kettenis@gnu.org>
* 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-22 09:45:01 +00:00
Jim Blandy 11708b95a3 * i386-tdep.c (LINUX_SIGTRAMP_INSN0, LINUX_SIGTRAMP_OFFSET0,
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-16 22:46:30 +00:00
Mark Kettenis 4cc2418890 2000-03-08 Mark Kettenis <kettenis@gnu.org>
* 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-08 22:34:19 +00:00
Mark Kettenis 45a816d93e 2000-03-04 Mark Kettenis <kettenis@gnu.org>
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-03-04 23:37:33 +00:00
Andrew Cagney 1211c4e429 From J.T.: Convert i386 to updated frame_saved_regs. 2000-02-29 13:28:24 +00:00
Andrew Cagney 024094993c From Eli. Bring go32 target up-to-date with recent GDB i386 changes. 2000-02-29 08:16:40 +00:00
Jim Blandy ceb4951f3d Doc fix. 2000-02-23 22:11:07 +00:00
Jason Molenda 917317f4c6 import gdb-1999-10-18 snapshot 1999-10-19 02:47:02 +00:00
Jason Molenda 2acceee218 import gdb-1999-10-04 snapshot 1999-10-05 23:13:56 +00:00
Jason Molenda c2c6d25f0d import gdb-1999-09-21 1999-09-22 03:28:34 +00:00
Stan Shebs d4f3574e77 import gdb-1999-09-08 snapshot 1999-09-09 00:02:17 +00:00
Jason Molenda 7be570e7ce import gdb-1999-08-16 snapshot 1999-08-16 19:57:19 +00:00
Jason Molenda 96baa820df import gdb-1999-08-09 snapshot 1999-08-09 21:36:23 +00:00
Jason Molenda a0b3c4fd32 import gdb-1999-08-02 snapshot 1999-08-02 23:48:37 +00:00
Jason Molenda c5aa993b1f import gdb-1999-07-07 post reformat 1999-07-07 20:19:36 +00:00
Jason Molenda 392a587b05 import gdb-1999-05-25 snapshot 1999-05-25 18:09:09 +00:00
Stan Shebs 7a292a7adf import gdb-19990422 snapshot 1999-04-26 18:34:20 +00:00
Stan Shebs c906108c21 Initial creation of sourceware repository 1999-04-16 01:35:26 +00:00
Stan Shebs 071ea11e85 Initial creation of sourceware repository 1999-04-16 01:34:07 +00:00
Jim Ingham c98fe0c119 This is the merge of the Itcl3.0 gdbtk development branch into the
trunk.  To build it, you will have to do update -dP in the itcl
directory, and update tcl, tk, tix and libgui as well.
1999-01-28 03:50:17 +00:00