* 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.
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.
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.
* 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.
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.
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.
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.
restrictions for mips hosts.
* config/mips/{xm-irix3.h, xm-mips.h, xm-news-mips.h, xm-riscos.h}:
Use it.
* mips-tdep.c (init_extra_frame_info): Do not check for
mips_in_lenient_prologue if it is a dummy frame.
Use read_memory_nobpt.
(is_delayed, mips_in_lenient_prologue): New functions.
(init_extra_frame_info): If in the prologue, don't use saved registers.
* config/mips/tm-mips.h: Declare mips_skip_prologue.
({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.
inferior_fp_registers by reading them from the inferior before
modifying and writing them back.
Fixes unexplainable inferior FP exceptions after calls to the inferior
or setting of floating point registers.
* mips-tdep.c (mips_skip_prologue): Skip move of argument register
to register which is generated by gcc-2.4.
the necessary bits.
* findvar.c (value_from_register): Fix uninitialized first_addr
which caused problems with assignment of doubles to register variables
on some targets.
* mipsread.c: Remove TM_FILE_OVERRIDE, include tm.h and provide the
missing mips definitions if necessary.
Fix handling of double register variables for mips targets and big
endian hosts. These patches are from Paul Flinders <ptf@delcam.co.uk>.
* config/mips/tm-mips.h: Increase MAX_REGISTER_{RAW,VIRTUAL}_SIZE to
8 bytes for doubles.
* config/mips/tm-mips.h (REGISTER_CONVERT_TO_TYPE): New macro for
conversion of type held in multiple registers to host format.
* config/mips/tm-mips.h (REGISTER_CONVERT_FROM_TYPE): New macro,
companion to REGISTER_CONVERT_TO_TYPE.
* config/mips/tm-mips.h (EXTRACT_RETURN_VALUE, STORE_RETURN_VALUE):
Convert to function calls.
* config/mips/tm-mips.h (FIX_CALL_DUMMY): New code for big endian
mips targets.
* mips-tdep.c (mips_print_register): Raw buffer now needs just
MAX_REGISTER_RAW_SIZE bytes.
* mips-tdep.c (mips_print_register): Use REGISTER_CONVERT_TO_TYPE
(if defined) for doubles.
* mips-tdep.c: (mips_extract_return_value, mips_store_return_value):
New functions, take care of REGISTER_CONVERT_TO/FROM_TYPE.
* valops.c (value_assign): Use REGISTER_CONVERT_TO_TYPE if
defined.
* findvar.c (value_from_register): Use REGISTER_CONVERT_TO_TYPE if
defined.
(heuristic_proc_start): use heuristic_fence_post, print better
warnings, but only if not stop_soon_quietly.
(_initialize_mips_tdep): add_set_cmd for heuristic-fence-post.
* breakpoint.c (enable_breakpoint): Don't enable watchpoint if it
went out of scope.
* exec.c (exec_close): Fix storage leak.
* exec.c (exec_file_command): Make sure that bfd doesn't realign the
output sections when patching an executable.
* mips-nat.c (store_inferior_registers): Use REGISTER_PTRACE_ADDR
when writing all registers.
* mips-tdep.c (mips_push_dummy_frame): Save floating point registers
at the right offset in the dummy frame.
* mipsread.c (psymtab_to_symtab_1): Do not complain for stProc,
stStaticProc and stEnd symbols as they are generated by gcc-2.x.
* mipsread.c (mipscoff_new_init): Initialize stabsread and buildsym.
protocol.
* config/idt.mt: New file; uses remote-mips.c
* configure.in (mips-idt-ecoff): New target; uses idt.mt.
* mips-tdep.c (mips_fpu): New variable; controls use of MIPS
floating point coprocessor.
(mips_push_dummy_frame): If not mips_fpu, don't save floating
point registers.
(mips_pop_frame): If not mips_fpu, don't restore floating point
registers.
(_initialize_mips_tdep): New function; let the user reset mips_fpu
variable.
* tm-mips.h (EXTRACT_RETURN_VALUE, STORE_RETURN_VALUE): If not
mips_fpu, don't use fp0 as floating point return register.
(FIX_CALL_DUMMY): If not mips_fpu, don't save floating point
registers.
Also added remote-mips.c to .Sanitize file.
* doc/gdbint.texinfo: Update GET_LONGJMP_TARGET, L_SET doc.
* irix4-nat.c, mips-nat.c (JB_ELEMENT_SIZE, get_longjmp_target):
Move from mips-tdep.c and tm-{irix3,mips}.h.
* mips-nat.c: Remove a bunch of code that was ifdef'd out of
native MIPS ports.
* nm-irix3.h, nm-mips.h (GET_LONGJMP_TARGET): Move from tm-irix3.h
and tm-mips.h.
* ultra3-nat.c (register_addr): Move from ultra3-xdep.c.
(fetch_core_registers): Fix bfd_seek arguments.
symbol. #define MIPS_EFI_SYMBOL_NAME instead. Use different
value so that demangler won't be invoked. This greatly speeds up
stepping.
* mips-tdep.c (mips_pop_frame): Rewrite handling of
linked_proc_info so that it properly deallocates the appropriate
item after it is done with it instead of before.
* Don't pass bogus frame pointer to create_new_frame(). Just
leave it as zero so that lower level code will figure out the
correct value.
Fix from Jim Williams.
* stack.c (return_command): Evaluate expression *before* popping
off the stack frames! Fix inspired by Jim Williams.
(up_silently_command, down_silently_command): No sel frame is error.
* defs.h (memcpy, memset): Conditionalize decls on
#ifndef MEM_FNS_DECLARED, since DECstation differs.
(alloca): Break out the STDC and non-STDC alloca cases, to make
it work on old preprocessors as well as "picky ANSI" ones.
* xm-mips.h (memcpy, memset): Declare, and set MEM_FNS_DECLARED.
* mips-tdep.c (heuristic_proc_start): Zero arg produces zero.
* utils.c (fputs_demangled): Rename SLOP since DECstation system
header files define it!
basis. See comments in objfiles.h and details in ChangeLog. Also remove
redundant definitions of FRAME_CHAIN_VALID from most of the tm-* files and
use a default definition in frame.h.
* All GDB files that #include defs.h: Removed stdio.h.
(defs.h): #include stdio.h.
This has been tested by building GDBs for all targets hosted on Sun4.
None of the build problems were related to stdio.h inclusion. (n.b.
many configurations don't build for other reasons.)
* blockframe.c (get_prev_frame_info): If FRAME_CHAIN_COMBINE
returns 0, there is no previous frame.
* breakpoint.c (commands_command): If !from_tty, don't call
input_from_terminal_p().
* dbxread.c (record_misc_function): Speed up slightly.
(compare_psymbols): Ditto.
* infcmd.c (do_registers_info): Take a second argument to
determine whether to print float registers. "info registers"
does not do so anymore. "info all-registers" does, now.
* mips-tdep.c, pyr-tdep.c (xxx_do_registers_info): Take second
arg and ignore it.
* tm-mips.h, tm-pyr.h (DO_REGISTERS_INFO): Pass second arg.
* inflow.c (initialize_inflow): Set tflags_ours correctly.