Commit Graph

178 Commits

Author SHA1 Message Date
Andrew Cagney acdb74a06f * mips-tdep.c: General cleanup. Delete all #if 0 code. Convert
all old style K&R function definitions to ISO-C.
(struct gdbarch_tdep): Add mips_abi_string.
(mips_gdbarch_init): Initialize.
(mips_dump_tdep): Print mips_abi_string and other values.
(mips_push_arguments): Add more detailed tracing.
2000-07-11 11:02:11 +00:00
Andrew Cagney 6c997a3432 Force MIPS to sign-extend any addresses read from registers. 2000-07-11 10:24:25 +00:00
Andrew Cagney 4014092b58 Move the ``set mask-address'' command to remote-mips.c. Disable
address masking in mips-tdep.c.
2000-07-11 09:25:22 +00:00
Andrew Cagney cce41527ca * mips-tdep.c (mips_push_arguments): Always align struct_addr on a
16 byte boundary. Align allocated argument space using
MIPS_STACK_ARGSIZE.  Reserve space on stack for the struct return
and floating-point registers.  Use fp_register_arg_p to determine
if float_argreg should be aligned.
2000-07-10 15:09:23 +00:00
Andrew Cagney f7b9e9fc07 More mult-arch conversions: IEEE_FLOAT, SKIP_PROLOGUE,
SAVED_PC_AFTER_CALL, DECR_PC_AFTER_BREAK, BREAKPOINT_FROM_PC,
INNER_THAN.
2000-07-07 09:19:03 +00:00
Michael Snyder 65c1106637 2000-07-06 Michael Snyder <msnyder@cleaver.cygnus.com>
* mips-tdep.c: Replace '16' with bfd_mach_mips16 where appropriate.
2000-07-06 23:17:32 +00:00
Andrew Cagney 566f0f7aa5 For EABI, start allocting space on the stack when the registers are
full.  Not when the number of args == 8.
2000-06-23 11:06:31 +00:00
Andrew Cagney f09ded2422 When FP registers are full, store FP arguments on stack and not in
integer registers.
2000-06-23 07:44:00 +00:00
Andrew Cagney 9ace04976e Add ``set debug mips'' command. Add much debugging. 2000-06-17 15:18:21 +00:00
Andrew Cagney 9a0149c65a For MIPS_EABI, squeeze simple floating point structs into an FP register. 2000-06-17 14:33:56 +00:00
Andrew Cagney 4a7f7ba82c EABI64 was selecting EABI32 2000-06-17 05:42:50 +00:00
Andrew Cagney 5213ab0692 Multi-arch GDB_TARGET_IS_MIPS64. 2000-06-12 04:35:39 +00:00
Andrew Cagney 2475bac391 Print all known but not yet multi-arched values. 2000-06-12 03:33:26 +00:00
Andrew Cagney 4b9b395931 Re-implement gdbach_dump() so that it prints out the macro values.
Add ``maint print arch'' command.
Add ``gdbarch_register()'' function that also takes gdbarch_dump_tdep().
Use in mips-tdep.c.
2000-06-10 05:37:47 +00:00
Andrew Cagney bf64bfd6ba MIPS is always multi-arch enabled. 2000-06-08 06:35:40 +00:00
Andrew Cagney b0069a1775 Delete MIPS_DEFAULT_FPU from config/mips/*.h 2000-06-08 04:51:10 +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
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
Andrew Cagney 47a8d4ba5d Handle case of 32 ABI saving 32 bit registers on stack when target
has 64 bit ISA.
2000-05-12 09:21:30 +00:00
Andrew Cagney 216a600b17 Fix tipo 32->64 in MIPS_EABI. 2000-05-12 04:51:22 +00:00
Andrew Cagney 0dadbba0df Add preliminary support for IRIX's n32 abi to the MIPS's multi-arch code. 2000-05-11 03:40:08 +00:00
Andrew Cagney d929b26ff1 Move some of the MIPS n32 ABI configuration options into the mips
multi-arch vector.
2000-05-08 02:53:04 +00:00
Andrew Cagney 28d069e647 Include "arch-utils.h". 2000-04-27 04:25:45 +00:00
DJ Delorie 65edb64b15 * mips-tdep.c (do_fp_register_row): copy the number of bytes
allocated, not the size of the pointer.
2000-04-13 22:58:42 +00:00
Andrew Cagney a5ea25581c Rename gdbarch-utils.[hc] to arch-utils.[hc]. 2000-04-09 14:35:35 +00:00
Jim Blandy b9a8e3bfd4 Bring COERCE_FLOAT_TO_DOUBLE under gdbarch's control.
* valops.c (COERCE_FLOAT_TO_DOUBLE): Rework definition to be
more function-like.
(default_coerce_float_to_double, standard_coerce_float_to_double):
New functions.
(value_arg_coerce): Adjust for new definition.
* value.h (default_coerce_float_to_double,
standard_coerce_float_to_double): New declarations for the above.
* gdbarch.sh (coerce_float_to_double): New entry, replacing macro.
* gdbarch.c, gdbarch.h: Regenerated.
* tm-alpha.h, tm-fr30.h, tm-m32r.h, tm-mips.h, tm-hppa.h,
tm-rs6000.h, tm-sh.h, tm-sparc.h (COERCE_FLOAT_TO_DOUBLE): Change
definitions.
* mips-tdep.c (mips_coerce_float_to_double): Supply our own custom
function here.
(mips_gdbarch_init): Install that as our coerce_float_to_double
function.
2000-02-22 19:18:53 +00:00
Jason Molenda ed9a39ebf9 import gdb-1999-12-21 snapshot 1999-12-22 21:45:38 +00:00
Jason Molenda c4093a6ab3 import gdb-1999-12-13 snapshot 1999-12-14 01:06:04 +00:00
Jason Molenda c2d11a7da0 import gdb-1999-12-06 snapshot 1999-12-07 03:56:43 +00:00
Jason Molenda 2acceee218 import gdb-1999-10-04 snapshot 1999-10-05 23:13:56 +00:00
Stan Shebs d4f3574e77 import gdb-1999-09-08 snapshot 1999-09-09 00:02:17 +00:00
Jason Molenda 53a5351d90 import gdb-1999-08-23 snapshot 1999-08-23 22:40:00 +00:00
Jason Molenda 43e526b9b4 import gdb-1999-07-12 snapshot 1999-07-12 11:15:22 +00:00
Jason Molenda c5aa993b1f import gdb-1999-07-07 post reformat 1999-07-07 20:19:36 +00:00
Jason Molenda 9846de1bb5 import gdb-1999-07-07 pre reformat 1999-07-07 17:31:57 +00:00
Jason Molenda 0f71a2f66f import gdb-1999-06-14 snapshot 1999-06-14 18:08:47 +00:00
Jason Molenda cce74817d9 import gdb-1999-06-07 snapshot 1999-06-07 19:19:32 +00:00
Stan Shebs cd0fc7c3eb import gdb-1999-05-10 1999-05-11 13:35:55 +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
David Taylor 4ef1f46773 hp merge changes -- too numerous to mention here; see ChangeLog and
ChangeLog-gdbtk for details.
1998-12-28 23:06:13 +00:00
Stu Grossman 0e52a532e4 * mips-tdep.c (mips32_heuristic_proc_desc): Clear temp_saved_regs
on restart.  Fixes problem with backtracing through functions that
	use virtual frame pointers.
1998-12-19 17:56:40 +00:00
Andrew Cagney cb2f9c9c67 Missed this file:
* config/mips/tm-mips.h (enum mips_fpu_type, mips_fpu): Move to
mips-tdep.c.
1998-12-18 06:03:39 +00:00
Andrew Cagney 1fe2e66a01 CARP/vr4xxx:
Rewrite ``set mipsfpu'' command so that it works with the multi-arch
framework.  For vr4111 and vr4121 disable the FPU.
1998-12-18 05:14:06 +00:00
Andrew Cagney 2e64ee9aae CARP:
Pass gdbarch_info by value to the arch init function.
Review doco.
Update mips-tdep.c
1998-12-18 03:21:45 +00:00
Andrew Cagney ff6f2f5786 CARP:
For MIPS, multi-arch MIPS_EABI, MIPS_LAST_FP_ARG_REGNUM,
MIPS_LAST_ARG_REGNUM.
1998-12-16 15:13:55 +00:00
Andrew Cagney 86a51f415d CARP: Mechanism to replace EXTRA_FRAME_INFO.
Add two pointers (saved_regs, extra_info) to struct frame_info.
Introduce new macro FRAME_INIT_SAVED_REGS which replaces
FRAME_FIND_SAVED_REGS.

Document.

Use in mn10300 and rs6000 targets. Fix side effects on ALPHA, MIPS,
Z8K and SPARC targets.
1998-12-12 02:50:39 +00:00
Andrew Cagney 9ddf9aa9be CARP:
Rename REGISTER_NAMES{} -> REGISTER_NAME().
1998-12-10 06:10:03 +00:00
Andrew Cagney 98760eab33 CARP: Convert macro definitions of USE_STRUCT_CONVENTION into target
specific functions.
1998-11-23 12:35:23 +00:00
Michael Snyder a00dfa360a Tue Jun 23 11:14:04 1998 Michael Snyder <msnyder@cleaver.cygnus.com>
* config/mips/tm-irix5.h: Modify to work better on irix 6, by
	making FP registers 8 bytes instead of 4.
	REGISTER_BYTES: redefine.  REGISTER_BYTE(): redefine.
	REGISTER_VIRTUAL_TYPE: redefine.  MIPS_LAST_ARG_REGNUM: redefine.
	* irix5-nat.c (fetch_core_registers): read 8 bytes per FP register.
	* mips-tdep.c (FP_REGISTER_DOUBLE): new macro to distinguish
	targets with 8-byte FP registers (don't use TARGET_MIPS64).
	(STACK_ARGSIZE): new macro, how much space is taken up on the
	stack for each function argument (don't use TARGET_MIPS64).
	(mips_push_arguments): modify logic to work better on Irix 6
	(n32 ABI).
1998-06-23 18:22:43 +00:00
Frank Ch. Eigler 88ff9e0600 * MIPS CPU-specific dissasembly extensions. Now TM_PRINT_INSN_MACH from tm.h
sets a default mach for disassembly, just like sparc port.  c.f. PR 15371.


Tue Apr 21 11:20:54 1998  Frank Ch. Eigler  <fche@cygnus.com>

	* mips-tdep.c (gdb_print_insn_mips): Disassemble MIPS instructions
 	with subtarget-specific `mach', rather than fixed default.
	* config/mips/tm-mips.h (TM_PRINT_INSN_MACH): New macro, default
	disassembly `mach'.
start-sanitize-r5900
	* config/mips/tm-r5900.h (TM_PRINT_INSN_MACH): Override.
end-sanitize-r5900
start-sanitize-sky
	* config/mips/tm-txvu.h (TM_PRINT_INSN_MACH): Override.
end-sanitize-sky
1998-04-21 15:38:13 +00:00
Ian Lance Taylor cf93a3aa81 * mips-tdep.c (do_fp_register_row): Use alloca rather than arrays
with dynamic size.
1998-04-09 23:21:14 +00:00
Andrew Cagney 912e805f74 Declare array using MAX_REGISTER_RAW_SIZE, not REGISTER_RAW_SIZE(X) 1998-04-05 23:57:44 +00:00
Mark Alexander 639c861230 * mips-tdep.c (set_reg_offset): New function.
(mips16_heuristic_proc_desc): Calculate offsets of registers
	saved by entry pseudo-op after rest of prologue has been read.
	Use set_reg_offset to ignore all but the first save of a given
	register.
	(mips32_heuristic_proc_desc): Initialize frame adjustment value.
	* remote-sim.c (gdbsim_store_register): Don't update registers
	that have a null or empty name.
	* findvar.c (read_register_bytes): Don't fetch registers
	that have a null or empty name.
1997-09-30 06:20:59 +00:00
Mark Alexander af774411e5 * config/mips-tm-mips.h (mips_extra_func_info): New frame_adjust
member for storing offset of MIPS16 frame pointer from SP.
	* mips-tdep.c: Use RA_REGNUM instead of hardcoded 31 throughout.
	(PROC_FRAME_ADJUST): Define.
	(mips16_heuristic_proc_desc): Store frame pointer adjustment value.
	(get_frame_pointer): Use frame pointer adjustment value when
	calculating frame address.
	* remote-sim.c (gdbsim_fetch_register): Don't fetch registers
	that have a null or empty name.
start-sanitize-tx19
	* config/mips/tm-tx19.h (MIPS_DEFAULT_FPU_TYPE): Define.
	(REGISTER_NAMES): Redefine to eliminate FP registers.
	* config/mips/tm-tx19l.h: Ditto.
end-sanitize-tx19
1997-09-26 19:42:55 +00:00
Jeff Law 91ee277977 * configure.tgt: Set gdb_target to r5900.
* config/mips/tm-r5900.h, config/mips/r5900.mt: New files

        * mips-tdep.c (_initialize_mips_tdep): Allow target files to
        override default FPU type.
Brought over from r5900 branch.
1997-09-26 18:53:22 +00:00
Mark Alexander 899c402166 * dbxread.c (MSYMBOL_SIZE): New macro.
(end_psymtab): Use MSYMBOL_SIZE to extract size from minimal symbol.
	* elfread.c (elf_symtab_read): If ELF symbol is "special",
	such as a MIPS16 function, mark minimal symbol as special too.
	* mips-tdep.c (pc_is_mips16): New function to check whether
	a function is MIPS16 by looking at the minimal symbol.  Use
	pc_is_mips16 throughout instead of IS_MIPS16_ADDR macro.
	* config/mips/tm-mips.h (SYMBOL_IS_SPECIAL, MAKE_MSYMBOL_SPECIAL,
	MSYMBOL_IS_SPECIAL, MSYMBOL_SIZE): New functions for setting/testing
	"special" MIPS16 bit in ELF and minimal symbols.
	* mdebugread.c (parse_partial_symbols): Don't construct a partial
	symbol table for a file that already has one.
start-sanitize-tx19
	* configure.tgt: Support TX19.
	* config/mips/tm-tx19.h, config/mips/tm-tx19l.h, config/mips/tx19.mt,
	config/mips/tx19l.mt: New files for TX19.
end-sanitize-tx19
1997-09-15 21:06:16 +00:00
Michael Snyder 87910097ba Thu Jul 3 17:41:46 1997 Michael Snyder (msnyder@cleaver.cygnus.com)
* mips-tdep.c (mips_extract_return_value): align 4-byte float
        return values within the 8-byte FP register.
1997-07-04 00:44:01 +00:00
Michael Snyder c430260cae Thu Jul 3 13:48:11 1997 Michael Snyder (msnyder@cleaver.cygnus.com)
* mips-tdep.c (mips_push_arguments): don't left-adjust 32-bit
        integers in 64-bit register parameters before function calls.
1997-07-03 20:50:11 +00:00
Michael Snyder 781a59b28a Mon Jun 30 17:54:51 1997 Michael Snyder (msnyder@cleaver.cygnus.com)
* mips-tdep.c (mips_push_arguments): special-case handling for
        odd-sized struct parameters passed in registers / on stack.
1997-07-01 00:57:19 +00:00
Michael Snyder 158bda58c5 Mon Jun 30 15:30:38 1997 Michael Snyder (msnyder@cleaver.cygnus.com)
* mips-tdep.c (mips_push_arguments): tweak alignment of small
        structs passed in registers for little-endian non-EABI mode.
1997-06-30 22:32:20 +00:00
Michael Snyder 08d8f99560 Fri Jun 27 21:05:45 1997 Michael Snyder (msnyder@cleaver.cygnus.com)
* mips-tdep.c (mips_push_arguments): handle alignment of
	integer and struct args on stack for mips64 big-endian.
1997-06-28 04:07:56 +00:00
Michael Snyder 0af60e0326 Fri Jun 27 19:19:12 1997 Michael Snyder (msnyder@cleaver.cygnus.com)
* config/mips/tm-mips.h (USE_STRUCT_CONVENTION): MIPS_EABI returns
        structs in a register wherever possible.
1997-06-28 02:23:30 +00:00
Mark Alexander f781fe93a6 * infrun.c (wait_for_inferior): Mark registers as invalid when
stepping over an instruction that triggered a watchpoint.
	* remote-mips.c: Numerous changes to support hardware breakpoints
	and watchpoints on LSI MiniRISC and TinyRISC boards.
	* mips-tdep.c: Move MIPS16-related macros to config/mips/tm-mips.h.
	(mips_breakpoint_from_pc): Account for different breakpoint
	instructions used by PMON and IDT monitor.
	* config/mips/tm-embed.h: Enable hardware breakpoints on embedded
	MIPS targets.
	* config/mips/tm-mips.h: Define breakpoint instructions for
	PMON and IDT monitor.  Move MIPS16-related macros here from
	mips-tdep.c.
1997-06-17 02:11:42 +00:00
Mark Alexander c81a76b311 * mips-tdep.c (mips_push_arguments): On non-EABI architectures,
copy first two floating point arguments to general registers, so that
	MIPS16 functions will receive the arguments correctly.
	(mips_print_register): Print double registers correctly on
	little-endian hosts.
	(mips_extract_return_value): Return double values correctly
	on little-endian hosts.

	* mdebugread.c (parse_procedure): Adjust address of procedure relative
	to address in file descriptor record; this accounts for constant
	strings that may precede functions in the text section.  Remove
	now-useless lowest_pdr_addr from argument list and all calls.
1997-03-22 04:40:03 +00:00
Mark Alexander c1fc093571 * mips-tdep.c (IS_MIPS16_ADDR, MAKE_MIPS16_ADDR, UNMAKE_MIPS16_ADDR):
New macros for testing, setting, and clearing bit 0 of addresses.
	Change numerous bits of code where bit 0 was being manipulated
	to use these macros.
1997-02-28 03:00:51 +00:00
Mark Alexander 32dab60312 * remote-mips.c (common_breakpoint): Prevent 64-bit addresses
from being sent to 32-bit targets by masking off upper bits.
	* mips-tdep.c (heuristic_proc_start): Mask off upper 32 bits
	of PC on 32-bit targets.
	(mips16_heuristic_proc_desc): Recognize 'addiu s1,sp,n' as a
	frame setup instruction.
	(mips32_heuristic_proc_desc): Fix warning found by gcc -Wall.
	(mips16_skip_prologue): Recognize 'addiu s1,sp,n' as a valid
	prologue instruction.  Fix warnings and bugs found by gcc -Wall.
	* buildsym.c (finish_block): Improve handling of overlapping blocks;
	fixes problem on MIPS16 printing function arguments.
1997-02-09 17:36:49 +00:00
Mark Alexander 7d9e8fac1a * mips-tdep.c (mips16_get_imm): Fix calculation of extended immediate.
(mips16_heuristic_proc_desc): Recognize jal(x) instruction.
1997-02-04 17:18:56 +00:00
Mark Alexander b348b9fd0e * mips-tdep.c (mips16_decode_reg_save): Distinguish between
sd and sw instructions correctly.
	(heuristic_proc_start): Add support for MIPS16.
	(mips16_get_imm, mips16_heuristic_proc_desc,
	mips32_heuristic_proc_desc): New helper functions for
	heuristic_proc_desc.
	(heuristic_proc_desc): Rewrite and reorganize to support MIPS16.
	(mips_push_arguments): Don't align small arguments in EABI.
	(mips32_skip_prologue): Attempt to shrink code size a little.
1997-02-04 02:09:33 +00:00
Mark Alexander 20fa0902e7 * mips-tdep.c (MIPS16_INSTLEN): Define.
(mips_find_saved_regs): Replace hardcoded 2's with MIPS16_INSTLEN.
	(heuristic_proc_start): Recognize 'entry' pseudo-op as a start
	of function on MIPS16.
	(mips32_skip_prologue, mips16_skip_prologue): New helper functions
	for mips_skip_prologue.
	(mips_skip_prologue): Recognize both 16- and 32-bit prologues.
1997-01-31 16:37:07 +00:00
Mark Alexander f9f8c14b1a First set of changes for mips16:
* config/mips/tm-mips.h (MIPS16_BIG_BREAKPOINT,
	MIPS16_LITTLE_BREAKPOINT, BREAKPOINT_FROM_PC): Define.
	(ABOUT_TO_RETURN): Call new function mips_about_to_return.
	(mips_breakpoint_from_pc, mips_about_to_return): Declare.
	* mem-break.c (memory_breakpoint_from_pc): New function.
	(memory_insert_breakpoint, memory_remove_breakpoint): Use
	memory_breakpoint_from_pc to determine breakpoint contents and size.
	* target.h (memory_breakpoint_from_pc): Declare.
	* monitor.c (monitor_insert_breakpoint): Use memory_breakpoint_from_pc
	to determine size of breakpoint instruction.
	* mips-tdep.c (mips32_decode_reg_save, mips16_decode_reg_save):
	New helper functions for mips_find_saved_regs.
	(mips_find_saved_regs): Recognize mips16 prologues.
	(mips_addr_bits_remove): Strip off upper 32 bits of address
	when target CPU is 32 bits but CORE_ADDR is 64 bits.
	(mips_step_skips_delay): No branch delay slot on mips16.
	(gdb_print_insn_mips): Disassemble mips16 code.
	(mips_breakpoint_from_pc, mips_about_to_return): New functions.
1997-01-28 00:50:13 +00:00
Peter Schauer 61d2d19a17 * config/mips/tm-mips.h (PC_IN_CALL_DUMMY): Removed, the default
definition in inferior.h is sufficient.
	* mips-tdep.c (mips_pc_in_call_dummy):  Ditto.
	(mips_push_arguments):  Make sure that the stack is aligned to a
	multiple of 8 after the arguments are pushed.
	Structures are always passed by value in the old ABI.
	Adjust argument register value on big endian targets when passing
	a value whose length is less than the register size.
	Write stack arguments with a single write_memory call.
	(mips_pop_frame):  Use frame_saved_regs instead of proc_desc to
	decide which registers have to be restored.
1996-12-21 21:01:01 +00:00
Mark Alexander 97e091b20f * mips-tdep.c (mips_push_arguments): Handle floating point args.
* config/mips/tm-mips.h (FIX_CALL_DUMMY): Define to set up $25
	correctly for PIC on Irix 5.
1996-12-15 04:59:14 +00:00
Mark Alexander 96431497ff * config/mips/tm-mips.h (ADDR_BITS_REMOVE, TARGET_READ_SP): Define.
(mips_addr_bits_remove): Declare.
	* mips-tdep.c (mips_push_dummy_frame): Fix heuristic-fence-post
	errors when hitting breakpoints during inferior function calls
	in 64-bit programs.
	(fix_sign_extension): Make public, rename to mips_addr_bits_remove.
	* utils.c (paddr_nz, preg_nz): New functions, similar to
	paddr and preg but don't print leading zeroes.
	* defs.h (paddr_nz, preg_nz): Declare.
	* remote-mips.c: Use paddr_nz instead of paddr throughout
	to reduce packet size.
	(pmon_end_download): Improve timeout error handling.
1996-11-27 03:40:02 +00:00
Dawn Perchik 28444bf3a1 * mips-tdep.c, remote-mips.c, values.c, mdebugread.c,
config/mips/tm-mips.h: Add/fix bugs for 64-bit mips support.
	* defs.h: Cleanup; add prototypess
	* corefile.c: Change FIXME #ifdef
	* win32-nat.c: Include windefs instead of windows.h.
	* utils.c: Add routines for printing addresses and registers
	based on type size.
1996-11-11 21:02:55 +00:00
Fred Fish 80e0e92aaa * mips-tdep.c (mips_read_processor_type): Add parens around
bitwise-and operands in comparison; previous expression always
	evaluated to 0 because of equality comparison of two constants.
1996-07-30 06:15:13 +00:00
Fred Fish f2bf454e0f * config/mips/tm-mips.h (struct frame_info): Forward decl.
(struct type): Ditto.
	(struct value): Ditto.

	* config/mips/tm-mips.h (sigtramp_address): Move extern decl
 	from mips-tdep.c to here.
	(sigtramp_end): Ditto.
	(fixup_sigtramp): Ditto.

	* config/mips/tm-mips.h (init_extra_frame_info): Add prototype.
	(mips_frame_chain): Ditto.
	(mips_step_skips_delay): Ditto.
	(mips_frame_saved_pc): Ditto.
	(mips_find_saved_regs): Ditto.
	(mips_frame_num_args): Ditto.
	(mips_pop_frame): Ditto.
	(mips_extract_return_value): Ditto.
	(mips_store_return_value): Ditto.
	(mips_push_dummy_frame): Ditto.
	(mips_push_arguments): Ditto.
	(mips_do_registers_info): Ditto.
	(ecoff_relocate_efi): Ditto.
	(ecoff_relocate_efi): Ditto.
	* irix4-nat.c (fetch_core_registers): Add prototype.
	* mips-tdep.c (read_next_frame_reg): Add prototype
	(heuristic_proc_start): Ditto.
	(heuristic_proc_desc): Ditto.
	(mips_print_register): Ditto.
	* config/mips/nm-irix5.h (procfs_set_watchpoint): Add prototype.
	(procfs_stopped_by_watchpoint): Ditto.
	* config/mips/nm-irix4.h (procfs_set_watchpoint): Add prototype.
	(procfs_stopped_by_watchpoint): Ditto.
	* config/alpha/tm-alpha.h (ecoff_relocate_efi): Add prototype.
	(struct symbol): Add forward decl for prototype.

	* breakpoint.c (internal_breakpoint_number): Only needed if
	GET_LONGJMP_TARGET or SOLIB_ADD is defined.

	* objfiles.c (ecoff_relocate_efi): Remove prototype.
1996-07-28 21:41:09 +00:00
Peter Schauer 09af586854 * alpha-tdep.c, mips-tdep.c (init_extra_frame_info):
Do not set saved registers from heuristics for a sigtramp frame.

	* dwarfread.c (enum_type):  Determine signedness of enum type
	from enumerators.

	* mips-tdep.c:  Include gdb_string.h, gcc -Wall lint.

	* rs6000-nat.c (xcoff_relocate_core):  Fix typo.

	* valops.c (value_repeat):  Fix length of memory transfer to
	match recent allocate_repeat_value change.
1995-10-21 13:14:53 +00:00
Peter Schauer 92a6d60053 * mips-tdep.c (mips_extract_return_value): Fix returning of
values whose length is less than the register size for big endian
	targets.
	* alpha-tdep.c (alpha_extract_return_value,
	alpha_store_return_value):  Use alpha_convert_register_to_*
	to handle functions returning "float" correctly.
1995-08-01 09:20:05 +00:00
Peter Schauer e4dbd248df * alpha-tdep.c: Move sigtramp handling of saved registers from
read_next_frame_reg to alpha_find_saved_regs, handle saved
	floating point registers.
	* mips-tdep.c:  Move sigtramp handling of saved registers from
	read_next_frame_reg to mips_find_saved_regs, handle saved
	floating point registers.
	* config/mips/tm-irix3.h, config/mips/tm-irix5.h,
	config/mips/tm-mipsv4.h (SIGFRAME_FPREGSAVE_OFF):  Define.

	* sparc-tdep.c (sparc_pc_adjust):  Fix check for `unimp'
	instruction to handle functions returning structures with
	large sizes properly.
1995-07-29 08:50:00 +00:00
Stan Shebs 18b46e7c53 General cleanup and simplication of disassembler interface.
* a29k-pinsn.c, arm-pinsn.c, convex-pinsn.c, gould-pinsn.c,
        hppa-pinsn.c, i386-pinsn.c, i960-pinsn.c, m68k-pinsn.c,
        m88k-pinsn.c, mips-pinsn.c, ns32k-pinsn.c, pyr-pinsn.c,
        rs6000-pinsn.c, sparc-pinsn.c, tahoe-pinsn.c, vax-pinsn.c: Remove.
	* gould-tdep.c, ns32k-tdep.c, tahoe-tdep.c, vax-tdep.c: New files,
	had been -pinsn.c files.
	* Makefile.in (ALLDEPFILES): Remove removed files.
	(a29k-pinsn.o, arm-pinsn.o, convex-pinsn.o, gould-pinsn.o,
        hppa-pinsn.o, i386-pinsn.o, i960-pinsn.o, m68k-pinsn.o,
        m88k-pinsn.o, mips-pinsn.o, ns32k-pinsn.o, pyr-pinsn.o,
        rs6000-pinsn.o, sparc-pinsn.o, tahoe-pinsn.o, vax-pinsn.o):
        Remove compile actions.
	* arm-tdep.o, gould-tdep.o, ns32k-tdep.o, tahoe-tdep.o,
	vax-tdep.o: Add compile actions.
	* defs.h (tm_print_insn): New global.
	* a29k-tdep.c (gdb_print_insn_a29k): New function.
	(_initialize_a29k_tdep): Rename from _initialize_29k,
	set tm_print_insn.
	* alpha-tdep.c (print_insn): Remove.
	(_initialize_alpha_tdep): Set tm_print_insn.
	* arm-tdep.c (arm_print_insn): New function, was print_insn
	in arm-pinsn.c.
	* convex-tdep.c (convex_print_insn): New function, was print_insn
	in convex-pinsn.c.
	* h8300-tdep.c (print_insn): Remove.
	(gdb_print_insn_h8300): New function.
	(_initialize_h8300_tdep): New function.
	* h8500-tdep.c (print_insn): Remove.
	(_initialize_h8500_tdep): New function.
	* hppa-tdep.c (_initialize_hppa_tdep): Set tm_print_insn.
	* i386-tdep.c (_initialize_i386_tdep): New function.
	* i960-tdep.c (mem, next_insn): New functions, were in
	i960-pinsn.c.
	(_initialize_i960_tdep): Set tm_print_insn.
	* m68k-tdep.c (_initialize_m68k_tdep): New function.
	* m88k-tdep.c (_initialize_m88k_tdep): New function.
	* mips-tdep.c (gdb_print_insn_mips): New function.
	(_initialize_mips_tdep): Set tm_print_insn.
	* pyr-tdep.c (pyr_print_insn): New function, was print_insn
	in pyr-pinsn.c.
	* rs6000-tdep.c (_initialize_rs6000_tdep): New function.
	* sh-tdep.c (print_insn): Remove.
	(gdb_print_insn_sh): New function.
	(_initialize_sh_tdep): Set tm_print_insn.
	* sparc-tdep.c (_initialize_sparc_tdep): New function.
	* w65-tdep.c (print_insn): Remove.
	(_initialize_w65_tdep): New function.
	* z8k-tdep.c (print_insn): Remove.
	(gdb_print_insn_z8k): New function.
	(_initialize_z8k_tdep): Set tm_print_insn.
	* printcmd.c (print_insn): New function, generic disassembler.
	* config/*/*.mt (TDEPFILES): Remove refs to *-pinsn.o.

	* defs.h (query_hook, error_hook): Fix prototypes.
1995-01-17 04:36:51 +00:00
Jim Kingdon 1d9489c120 * mips-tdep.c (mips_skip_prologue): Accept or as well as addu for
`move $s8, $sp' instruction.
1995-01-10 21:24:34 +00:00
Stan Shebs 9f9f94aa09 Support for different MIPS IDT processor models.
* mips-tdep.c (mips_processor_type, tmp_mips_processor_type,
	mips_generic_reg_names, mips_r3041_reg_names,
	mips_r3051_reg_names, mips_r3081_reg_names,
	mips_processor_type_table): New	globals.
	(mips_do_registers_info): Don't display register if name is empty.
	(mips_set_processor_type_command): New command.
	(mips_show_processor_type_command): New command.
	(mips_set_processor_type): New function.
	(mips_read_processor_type): New function.
	* config/mips/tm-idt.h (DEFAULT_MIPS_TYPE): New macro.
	* config/mips/tm-mips.h (DEFAULT_MIPS_TYPE): New macro.
	(NUM_REGS): Increase to account for all CP0 registers.
	(REGISTER_NAMES): Add empty names for CP0 registers.
	(FIRST_EMBED_REGNUM, LAST_EMBED_REGNUM): Adjust.
	(PRID_REGNUM): New macro.
1994-11-18 02:18:09 +00:00
Stan Shebs ac57e5adda * infcmd.c (do_registers_info) [INVALID_FLOAT]: Only use if
defined.
	* values.c (unpack_double) [INVALID_FLOAT]: Ditto.
	* mips-tdep.c (mips_print_register): Don't test float validity.
	* config/a29k/tm-a29k.h, config/alpha/tm-alpha.h,
	config/arm/tm-arm.h, config/convex/tm-convex.h,
	config/h8300/tm-h8300.h, config/h8500/tm-h8500.h,
	config/i386/tm-i386v.h, config/i386/tm-sun386.h,
	config/i960/tm-i960.h, config/m68k/tm-m68k.h,
	config/m88k/tm-m88k.h, config/mips/tm-mips.h,
	config/ns32k/tm-merlin.h, config/ns32k/tm-nbsd.h,
	config/ns32k/tm-ns32km3.h, config/ns32k/tm-umax.h,
	config/pa/tm-hppa.h, config/pyr/tm-pyr.h,
	config/rs6000/tm-rs6000.h, config/sh/tm-sh.h,
	config/sparc/tm-sparc.h, config/z8k/tm-z8k.h (INVALID_FLOAT):
	Remove definition.
1994-09-25 21:13:24 +00:00
Jim Kingdon b5aff26825 * mips-tdep.c (mips_step_skips_delay), config/mips/tm-mips.h
(STEP_SKIPS_DELAY): Added.
	* infrun.c (proceed) [STEP_SKIPS_DELAY]: Check for a breakpoint in
	the delay slot.
1994-03-01 00:15:07 +00:00
Jim Kingdon 3fed1c4a60 * mips-tdep.c (mips_print_register): Print integers using
print_scalar_formatted rather than duplicating all the
	CC_HAS_LONG_LONG and so on.
	(mips_push_dummy_frame): Use read_register_gen rather than using
	read_register and then putting it back in target format with
	store_unsigned_integer.  If registers are more than 4 bytes, give
	an error rather than have some registers overwrite other
	registers.
	#if 0 unused include of opcode/mips.h.
1994-02-25 04:23:19 +00:00
Kung Hsu 70126bf94e Modified Files:
ChangeLog configure.in defs.h mips-tdep.c

        * configure.in: add mips64-*-elf, mips64-*-ecoff, mips64el-*-elf,
        mips64el-*-ecoff and mips64-big-*.
        * defs.h: get rid of FORCE_LONG_LONG.
        * mips-tdep.c (mips_find_saved_regs): add sd and sdc1 instruction
        parsing. Change register size to be MIPS_REGSIZE.
1994-02-18 01:38:08 +00:00
Peter Schauer 0434c1a0c9 * mdebugread.c (parse_procedure): Remove _sigtramp kludges for
alpha and irix. The _sigtramp case has to be handled properly
	in the tdep files if we have no ecoff debugging info.
	* alpha-tdep.c (alpha_frame_saved_pc, alpha_frame_chain),
	mips-tdep.c (mips_frame_saved_pc):  Handle signal handler frames
	without PC_REGNUM kludge.
	* mdebugread.c (fixup_sigtramp), mips-tdep.c (read_next_frame_reg):
	Clean up handling of mips sigtramp frames, improve comments.
1994-01-31 16:23:48 +00:00
Peter Schauer 5efd597b3c * mips-tdep.c (init_extra_frame_info): Use frame relative stack
pointer value when fixing up the frame at the start of a function
1994-01-22 20:45:55 +00:00
Ian Lance Taylor e03c0cc670 Added Irix 5 support.
* configure.in (mips-sgi-irix5*): New host and target.  Use irix5
	for both.
	* config/mips/irix5.mh, config/mips/irix5.mt,
	config/mips/xm-irix5.h, config/mips/nm-irix5.h,
	config/mips/tm-irix5.h, irix5-nat.c: New files for Irix 5 support.
	* mdebugread.c: New file, split out of mipsread.c.  Added
	elfmdebug_build_psymtabs routine.  Added some checks on external
	symbols.  Changed code to keep ecoff_debug_info and
	ecoff_debug_swap structs in the psymtab and in global pointers
	rather than retrieving them from the bfd.  Also changed to keep
	the pending list with the psymtab rather than the objfile (each
	psymtab for a single objfile points to the same pending list).
	* mipsread.c: Bulk of file moved into mdebugread.c, leaving just
	the sym_fns.
	* Makefile.in (SFILES): Added mdebugread.c.
	(OBS): Added mdebugread.o.
	(mdebugread.o): New target.
	* symfile.h: Declare mdebug_build_psymtabs and
	elfmdebug_build_psymtabs.
	* elfread.c (struct elfinfo): Added mdebugsect field.
	(elf_locate_sections): Remember location of .mdebug section.
	(elf_symfile_read): Call elfmdebug_build_psymtabs on .mdebug
	section.
	* infrun.c (AT_FUNCTION_START): Set to 0 if not already defined.
	(wait_for_inferior): Use AT_FUNCTION_START if it is defined to see
	if PC is at the start of a function.
	* mips-tdep.c (read_next_frame_reg): Use SIGFRAME_REG_SIZE, and
	give it a default definition.
	(mips_skip_prologue): Skip instructions which initialize $gp
	register.
	(in_sigtramp): New procedure, moved in from mipsread.c.
	* config/mips/tm-mips.h: Declare in_sigtramp.
1993-12-06 17:31:05 +00:00
Jim Kingdon 002a422b22 * mips-tdep.c (init_extra_frame_info): Check to see whether the
registers mentioned in the proc_desc have been saved.  This
	generalizes mips_in_lenient_prologue in the sense that we keep
	searching until we've found saves for all the registers, not just
	look for a "lenient prologue" pattern.
	* mips-tdep.c: #if 0 lenient prologue code.

	* mips-tdep.c (heuristic_proc_desc): Don't assume a host short
	is 16 bits.
1993-11-12 16:35:59 +00:00
Thomas Lord 199b2450f6 Change the stream argument to _filtered to GDB_FILE *.
Change all references to stdout/stderr to gdb_stdout/gdb_stderr.

Replace all calls to stdio output functions with calls to
corresponding _unfiltered functions (`fprintf_unfiltered')

Replaced calls to fopen for output to gdb_fopen.

Added sufficient goo to utils.c and defs.h to make the above work.

The net effect is that stdio output functions are only directly used
in utils.c.  Elsewhere, the _unfiltered and _filtered functions and
GDB_FILE type are used.

In the near future, GDB_FILE will stop being equivalant to FILE.

The semantics of some commands has changed in a very subtle way:
called in the right context, they may cause new occurences of
prompt_for_continue() behavior.  The testsuite doesn't notice anything
like this, though.

Please respect this change by not reintroducing stdio output
dependencies in the main body of gdb code.  All output from commands
should go to a GDB_FILE.

Target-specific code can still use stdio directly to communicate with
targets.
1993-11-01 22:25:23 +00:00
Jim Kingdon 3f528883ae * mips-tdep.c (mips_frame_chain): If frame size zero, return zero.
* rs6000-tdep.c: Add comment about framelessness.
1993-09-23 19:03:38 +00:00
Peter Schauer 8b52d48669 * config/mips/tm-mips.h (STORE_STRUCT_RETURN): Define as noop as
the pushing of the struct return address is already handled in
	mips_push_arguments.
	* mips-tdep.c (reinit_frame_cache_sfunc):  Fix typo in prototype
	declaration.
	* mipsread.c (parse_symbol, parse_type, upgrade_type):  Add more
	sanity checks for corrupt symbol entries to avoid core dumps
	reported by benson@odi.com. Obviously Ultrix 4.3A cc now has
	the same problems as the OSF/1 alpha cc.
	* mipsread.c (parse_lines):  Iterate over the range of the compressed
	line number entries, the old iteration sometimes failed to stop
	and wrote past the end of the LINETABLE. Add sanity check to avoid
	the same problem in case the line number info is corrupt.
	* mipsread.c (parse_procedure):  Adjust pdr for alpha __sigtramp.
	* mipsread.c (parse_external, parse_partial_symbols):  Ignore stNil
	symbols that are produced for statics in .o files and stLocal symbols
	that are produced for every section in OSF/1 dynamically linked
	 executables.
	* mipsread.c (psymtab_to_symtab_1):  Put out `undefined symbols'
	warning only under `verbose on' as there are many undefined symbols
	in a dynamically linked executable.
1993-09-23 07:22:06 +00:00
Jim Kingdon e797b4bc3b * mips-tdep.c (mips_frame_chain): If frame size zero, return zero. 1993-09-22 20:33:36 +00:00
Jim Kingdon bdef72d222 * mips-tdep.c (mips_frame_chain): If PROC_FRAME_OFFSET is zero,
then return zero.
1993-09-22 19:31:42 +00:00
K. Richard Pixley 4ed97c9a83 bzero -> memset 1993-09-01 21:56:42 +00:00
Jim Kingdon 427fec5d1b * mips-tdep.c: Call reinit_frame_cache every time the user does
"set heuristic-fence-post".
1993-08-27 19:33:43 +00:00