2000-03-08 Dave Brolley <brolley@redhat.com>
* cgen-par.h (cgen_write_queue_kind): Add CGEN_FN_SF_WRITE.
(CGEN_WRITE_QUEUE_ELEMENT): Add fn_sf_write.
(sim_queue_fn_si_write): Last argument is has type USI.
(sim_queue_fn_sf_write): New function.
* cgen-par.c (sim_queue_fn_si_write): Declare 'value' as USI.
(sim_queue_fn_sf_write): New function.
(cgen_write_queue_element_execute): Handle CGEN_FN_SF_WRITE.
* minsyms.c: #include <ctype.h>, for msymbol_hash_iw.
(compact_minimal_symbols): Added `objfile' argument.
Put symbols in the objfile's hash table.
(install_minimal_symbols): Put symbols in the objfile's demangled
hash table.
(lookup_minimal_symbol): Use hash table to find symbol in
objfile.
(msymbol_hash_iw, msymbol_hash, add_minsym_to_hash_table): New
functions.
(prim_record_minimal_symbol_and_info): Initialize the
hash link fields of the new minimal symbol.
* symtab.h (struct minimal_symbol): New fields `hash_next',
`demangled_hash_next'.
(msymbol_hash_iw, msymbol_hash, add_minsym_to_hash_table): Declare.
* objfiles.h (MINIMAL_SYMBOL_HASH_SIZE): New define.
(struct objfile): New fields `msymbol_hash',
`msymbol_demangled_hash'.
* mi-cmds.h: Export mi_cmd_data_write_register_values.
* mi-cmds.c (mi_cmds): Implement data-write-register-values with
mi_cmd_data_write_register_values.
* mi-main.c (mi_cmd_data_write_register_values): New
function. Write a value into a register.
* mi-disassemble.exp: Don't assume numbers for the offset
values. They can be different depending on the architecture.
* mi-watch.exp (test_watchpoint_triggering): In same cases the
type can be 'hw wathcpoint' not just 'watchpoint'. Adjust for that.
* basics.c (callee4): Make the function return something,
otherwise the return value is undefined.
Allow GDB to run on Linux 2.0 again.
* config.in: Add HAVE_PTRACE_GETREGS.
* configure.in: Check if <sys/ptrace.h> defines PTRACE_GETREGS.
* configure: Regenerated.
* config/i386/nm-linux.h (CANNOT_FETCH_REGISTER,
CANNOT_STORE_REGISTER): New defines.
* i386-linux-nat.c (have_ptrace_getregs): New variable.
(PTRACE_XFER_TYPE, CANNOT_FETCH_REGISTER, fetch_register,
old_fetch_inferior_registers, CANNOT_STORE_REGISTER,
store_register, old_store_inferior_registers): Copied over from
`inptrace.c' as a temporary measure.
(fetch_regs, store_regs, fetch_fpregs, store_fpregs):
Conditionalize on HAVE_PTRACE_GETREGS. Define stubs if
HAVE_PTRACE_GETREGS isn't defined.
(fetch_regs): Reset `have_ptrace_getregs' if ptrace call fails
with EIO.
(fetch_inferior_registers, store_inferior_registers): Fall back on
the method use in `infptrace.c' (by calling
old_fetch_inferior_registers and old_store_inferior_registers) if
`have_ptrace_getregs' isn't set.
* i386-linux-nat.c: Use elf_gregset_t and elf_fpregset_t instead
of gregset_t and fpregset_t. Those are the only names that are
guaranteed to specify the right types for all supported Linux
systems out there.
Various doc fixes and gratitious local variable renames, all in an
attempt to stress similarities between the code and unify the
terminology used. Use ISO-C all over.
(regmap): Remove trailing comma.
(FPREG_ADDR): Renamed from FPREGSET_T_FPREG_ADDR.
(convert_to_gregset): Make static. Remove GDB_REGS argument. It
is unnecessary and wasn't used anyway. All callers changed.
(convert_to_fpregset, convert_to_xfpregset): Likewise.
(fetch_regs, store_regs): Remove unused variable `regno'.
(fill_fpregs): If REGNO is not -1, only update the specified
register.
(fetch_core_registers): Renamed from
i386_linux_fetch_core_registers. There is no need for a unique
name since the function is static anyway.
(linux_elf_core_fns): Renamed from i386_linux_nat_core_functions
since it is more descriptive.
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.
* defs.h (struct continuation_arg): Change type of field 'data'
from PTR to void *.
* event-loop.h: Eliminate uses of PTR, use 'void *' instead.
* event-top.c: Ditto.