* rs6000-tdep.c (rs6000_gdbarch_init): Set store_struct_return
instead of deprecated_store_return_value. Fix fallout from
2002-08-23 Andrew Cagney <cagney@redhat.com>.
* rs6000-tdep.c (rs6000_gdbarch_init): Use deprecated version of
store_return_value.
(e500_extract_return_value): Change type of valbuf pointer to
void.
* rs6000-tdep.c (struct rs6000_framedata): Add saved_ev and
ev_offset fields.
(skip_prologue): Add support for BookE/e500 instructions.
(e500_extract_return_value): New function.
(frame_get_saved_regs): Add support for saving ev registers and
pseudo gpr's.
(e500_store_return_value): New function.
(rs6000_gdbarch_init): Move up default intializations of
deprecated_extract_return_value and store_return_value. Overwrite
init of store_return_value with e500 specific version.
Set extract_return_value for e500.
* ppc-tdep.h (struct gdbarch_tdep): Add ev registers.
* rs6000-tdep.c (rs6000_register_virtual_type): Return 64 bit
vector type for ev registers.
(e500_pseudo_register_read): New function.
(e500_pseudo_register_write): New function.
(e500_dwarf2_reg_to_regnum): New function.
(PPC_UISA_NOFP_SPRS): New macro.
(PPC_EV_REGS): New macro.
(PPC_GPRS_PSEUDO_REGS): New macro.
(registers_e500): New register set for e500.
(variants): Add e500 variant.
(rs6000_gdbarch_init): Move setting of pc, sp, fp regnums to
before setting architectural dependent variations. Initialize ev
registers numbers. Add case for e500 architecture. Set the
number of pseudo registers.
* rs6000-tdep.c (struct reg): Add field to indicate a pseudo
register.
(P): New macro to define a register as a pseudo register.
(R, R4, R8, R16, FR32, R64, R0): Updated.
(struct variant): Add new fields for number of pseudo registers
and number of total registers.
(tot_num_registers): New macro replacing....
(num_registers): ...deleted macro.
(num_registers): New function.
(num_pseudo_registers): New function.
(variants): Update all variants to intialize new fields correctly.
Postpone initialization of number of pseudo regs and real regs.
(init_variants): New function.
(rs6000_gdbarch_init): Initialize variants. Update calculation of
registers offsets.
* rs6000-tdep.c (rs6000_gdbarch_init): Remove variable print_insn
and its setting. Set gdbarch instruction printing functions
directly. For non-rs6000 case use new function
gdb_print_insn_powerpc.
(gdb_print_insn_powerpc): New function.
instead of ->prev.
* z8k-tdep.c (z8k_frame_chain): Do not use ->prev.
* s390-tdep.c (s390_frame_chain): Do not use ->prev.
* rs6000-tdep.c (frame_get_saved_regs): Use rs6000_frame_chain()
instead of ->prev.
rs6000_breakpoint_from_pc() to fetch breakpoint instruction
and size. Use target_insert_breakpoint() and
target_remove_breakpoint() to insert and remove breakpoints
instead of explicit memory reads and writes.
* dwarf2cfi.c (cfi_write_fp): Document as not used.
* mips-tdep.c (mips_gdbarch_init): Do not set write_fp.
* ia64-tdep.c (ia64_gdbarch_init): Do not set write_fp.
* m68hc11-tdep.c (m68hc11_gdbarch_init): Do not set write_fp.
* rs6000-tdep.c (rs6000_gdbarch_init): Do not set write_fp.
* s390-tdep.c (s390_gdbarch_init): Do not set write_fp.
(s390_write_fp):
* sh-tdep.c (sh_gdbarch_init): Do not set write_fp.
* x86-64-tdep.c (i386_gdbarch_init): Do not set write_fp.
* d10v-tdep.c (d10v_gdbarch_init): Do not set write_fp.
(d10v_write_fp): Delete function.
* inferior.h (write_fp, generic_target_write_fp): Delete
declarations.
* regcache.c (generic_target_write_fp): Delete function.
(write_fp): Delete function.
* gdbarch.sh (TARGET_WRITE_FP): Delete.
* gdbarch.h, gdbarch.c: Regenerate.
* config/v850/tm-v850.h (TARGET_WRITE_FP): Delete macro.
* config/sparc/tm-sp64.h (TARGET_WRITE_FP): Delete macro.
(sparc64_write_fp): Delete declaration.
* config/h8500/tm-h8500.h (TARGET_WRITE_FP): Delete macro.
(h8500_write_fp): Delete declaration.
* rs6000-tdep.c (struct rs6000_framedata): Add fields for AltiVec
vector registers handling.
(skip_prologue): Handle new AltiVec instructions. Fill in new
fields of frame data.
(frame_get_saved_regs): Fill in information for AltiVec registers.
* ppc-linux-tdep.c (ppc_sysv_abi_use_struct_convention): New
function.
* ppc-tdep.h (ppc_sysv_abi_use_struct_convention): Export.
* rs6000-tdep.c (rs6000_gdbarch_init): Use different
structure returning convention for SYSV ABI case, but not
for GNU/Linux, FreeBSD, or NetBSD.
* rs6000-tdep.c (rs6000_gdbarch_init): Use correct max size value
for gdbarch_max_register_raw_size and max_register_virtual_size.
Adjust copyright year.
* rs6000-tdep.c (rs6000_gdbarch_init): Don't call
find_variant_by_name, because it confuses the multiarch
framework. Return NULL if there isn't an architecture with the
user supplied name, instead of forcing a different one without
recording the change with the multiarch machinery.
(find_variant_by_name): Delete.
[Based on work by Jim Blandy]
* gdbtypes.h (builtin_type_v16qi, builtin_type_v8hi): Export.
(builtin_type_vec128): Export.
* gdbtypes.c (builtin_type_v16qi, builtin_type_v8hi): New SIMD
types.
(builtin_type_vec128): New builtin type for 128 bit vector
registers.
(build_gdbtypes): Initialize builtin_type_v16qi and
builtin_type_v8hi. Create the vec128 register builtin type
structure.
(build_builtin_type_vec128): New function.
(_initialize_gdbtypes): Register builtin_type_v16qi and
builtin_type_v8hi with gdbarch. Same for builtin_type_vec128.
* rs6000-tdep.c (rs6000_register_virtual_type): Change type of
AltiVec register to new builtin type.
* gdbarch.c, gdbarch.h: Regenerated.
* gdbtypes.c (build_gdbtypes): If TARGET_CHAR_SIGNED is zero,
set the TYPE_FLAG_UNSIGNED bit on the type.
* s390-tdep.c (s390_gdbarch_init): On the S/390, characters
are unsigned by default.
* rs6000-tdep.c (rs6000_gdbarch_init): Same for PowerPC and
RS6000.
(rs6000_in_solib_return_trampoline): Declare.
* rs6000-tdep.c (rs6000_in_solib_return_trampoline): New
function.
(rs6000_skip_trampoline_code): Skip bigtoc fixup code.
* xcoffread.c (read_xcoff_symtab): Perform the ISFCN function
check after the CSECT check rather than before it. Allocate
separate symtabs for CSECTs whose names begin with '@'.
(scan_xcoff_symtab): Don't ignore symbols beginning with '@'.
Activate the misc_func_recorded mechanism for whose names begin
with '@'.
SOLIB_SYMBOLS_MANUAL code, cleanup of AIX shared library handling code.
* rs6000-nat.c (vmap_symtab): Do not try to modify offsets
if symbols are not yet loaded.
(vmap_add_symbols): New function to add symbols for a vmap entry.
(add_vmap): Turn errors into warnings, return NULL vmap upon
failure. Add symbols via vmap_add_symbols only if requested.
(xcoff_relocate_core): Allow debugging of core files without an
executable file. Handle NULL returns from add_vmap gracefully.
* xcoffsolib.c (solib_add): Remove, no longer needed.
(solib_info): Do not check for new shared libraries if there is no
inferior process.
(sharedlibrary_command): Made static.
Do not check for new shared libraries if there is no inferior process.
Add symbols for requested shared libraries via vmap_add_symbols.
(_initialize_solib): Add `set auto-solib-add' command.
* xcoffsolib.h (vmap_add_symbols): Add prototype declaration.
* config/rs6000/tm-rs6000.h (PC_LOAD_SEGMENT): Move from here ...
* config/rs6000/nm-rs6000.h: ... to here, this is an AIX native
feature.
* config/powerpc/tm-macos.h, config/powerpc/tm-ppc-eabi.h,
config/powerpc/tm-ppc-nw.h, config/rs6000/tm-rs6000ly.h:
Remove #undef PC_LOAD_SEGMENT.
* config/powerpc/aix.mt, config/rs6000/aix4.mt, config/rs6000/rs6000.mt
(TDEPFILES): Move xcoffsolib.o from here ...
* config/powerpc/aix.mh, config/rs6000/aix4.mh, config/rs6000/rs6000.mh
(NATDEPFILES): ... to here, xcoffsolib.o contains AIX native code
only.
* rs6000-tdep.c: Remove #include xcoffsolib.h, no longer needed.
* xcoffsolib.h (xcoff_relocate_symtab_hook): Remove declaration.
* rs6000-nat.c (_initialize_core_rs6000): Remove setting of
xcoff_relocate_symtab_hook, no longer needed.
* xcoffsolib.c (solib_info, sharedlibrary_command): Remove
xcoff_relocate_symtab_hook indirection, call xcoff_relocate_symtab
directly, as xcoffsolib.c is now compiled in native AIX configurations
only.
* Makefile.in: Update dependencies for rs6000-tdep.o, rs6000-nat.o
and xcoffsolib.o.
for call dummy instead of accessing stop_stack_dummy, which does
not work if we `return' from a stop in a call dummy.
(rs6000_gdbarch_init): Use generic_save_dummy_frame_tos for
dummy_frame_tos function to make PC_IN_CALL_DUMMY work.
* rs6000-tdep.c (DEFAULT_LR_SAVE): Move to config/*/tm-*.h.
(rs6000_gdbarch_init): Use generic_pc_in_call_dummy instead of
rs6000_pc_in_call_dummy.
* config/rs6000/tm-rs6000.h (DEFAULT_LR_SAVE): Move here from
rs6000-tdep.c.
* config/powerpc/tm-ppc-eabi.h: Remove various definitions
handled by multi-arched rs6000-tdep.c.
support. Incorporate most of tm-rs6000.h.
(find_toc_address_hook): Rename to rs6000_find_toc_address_hook.
(rs6000_set_host_arch_hook): Declare.
(read_memory_addr): Define.
(pop_frame): Rename to rs6000_pop_frame.
(rs6000_pop_frame, rs6000_fix_call_dummy, rs6000_push_arguments,
rs6000_frame_saved_pc, rs6000_frame_chain): Remove non-generic
dummy frame handling.
(branch_dest, rs6000_pop_frame, rs6000_skip_trampoline_code,
rs6000_frame_saved_pc, frame_get_saved_regs,
frame_initial_stack_address, rs6000_frame_chain,
rs6000_convert_from_func_ptr_addr): Call read_memory_addr instead
of read_memory_integer.
(branch_dest, rs6000_pop_frame, rs6000_push_arguments,
rs6000_skip_trampoline_code, rs6000_frame_saved_pc,
frame_get_saved_regs, frame_initial_stack_address,
rs6000_frame_chain): Replace 4 with TDEP->wordsize.
(skip_prologue): Recognize some 64-bit stack adjustments.
(push_dummy_frame, pop_dummy_frame, set_processor,
show_processor): Delete.
(frame_get_saved_regs): Manipulate saved register addresses using
CORE_ADDR instead of int.
(rs6000_create_inferior): New function.
(register_names_*[]): Change to struct reg registers_*[].
(variants[]): Assimilate into multi-arch approach.
(register_names_*[], variants[]): Refer to pre-PowerPC
architectures as POWER instead of RS6000.
* rs6000-nat.c: Ubiquitous changes for 64-bit support.
(vmap_secs, xcoff_relocate_symtab): Cast addresses
to unsigned long to avoid sign-extension errors.
(set_host_arch): New function.
(xcoff_relocate_symtab): Try disabling usleep(36000) workaround.
(rs6000_core_fns): Use new bfd_target_xcoff_flavour.
(_initialize_core_rs6000): Initialize rs6000_set_host_arch_hook.
* symfile.c (find_sym_fns): Remove special xcoff kludge.
* xcoffread.c (secnum_to_bfd_section): Initialize args.objfile.
(process_linenos): Query line struct size from coff
backend instead of using compile-time constant.
(enter_line_range): Likewise.
(read_xcoff_symtab): Pass "XCOFF64" instead of "XCOFF" to
record_debugformat() if appropriate.
(process_xcoff_symbol): Access symbol addresses using
SYMBOL_VALUE_ADDRESS instead of SYMBOL_VALUE.
(read_symbol_lineno): Retrieve XCOFF64 symbol names from strtbl.
(scan_xcoff_symtab): Likewise. Query syment struct size from
coff backend instead of using compile-time constant.
(xcoff_sym_fns): Set flavour to bfd_target_xcoff_flavour.
* Makefile.in (INTERNAL_LDFLAGS): Add $(MH_LDFLAGS) to list of flags
that this Makefile variable get set to. (From Kevin Buettner.)
* config/powerpc/aix.mh (MH_LDFLAGS): Add linker flags so that
the TOC doesn't overflow. (From Kevin Buettner.)
* config/powerpc/tm-ppc-aix.h: Move config decisions to
multi-arched rs6000-tdep.c.
* config/rs6000/tm-rs6000.h: Likewise.
(GDB_MULTI_ARCH): Define.
(skip_trampoline_code): Rename to rs6000_skip_trampoline_code.
(is_magic_function_pointer): Replace with
rs6000_convert_from_func_ptr_addr.
(TARGET_CREATE_INFERIOR_HOOK): Define.
(find_toc_address_hook): Rename to rs6000_find_toc_address_hook.
(rs6000_set_host_arch_hook): Declare.
* config/rs6000/nm-rs6000.h (CHILD_XFER_MEMORY): Define.
at run-time. At the moment, the only thing this affects is the
set of registers visible.
* config/rs6000/tm-rs6000.h (REGISTER_NAME): Define this as a call
to the function rs6000_register_name.
(rs6000_register_name): Include extern decl.
(NUM_REGS): Bump to 183. What's the right way to do this?
(FIRST_UISA_SP_REGNUM, LAST_UISA_SP_REGNUM): Renamed from
FIRST_SP_REGNUM, LAST_SP_REGNUM.
(REGISTER_BYTES): Recompute this.
* rs6000-tdep.c: Renamed all uses of FIRST_SP_REGNUM and
LAST_SP_REGNUM to FIRST_UISA_SP_REGNUM and LAST_UISA_SP_REGNUM, with
some concomitant formatting changes.
#include "gdbcmd.h", so we can define commands here.
(struct variant): New structure.
(COMMON_UISA_REG_NAMES, PPC_UISA_SPR_NAMES, PPC_SEGMENT_REG_NAMES,
PPC_32_OEA_SPR_NAMES, num_registers): New macros.
(register_names_rs6000, register_names_uisa, register_names_403,
register_names_403GC, register_names_505, register_names_860,
register_names_601, register_names_602, register_names_603,
register_names_604, register_names_750, variants): New variables.
(rs6000_register_name, install_variant, find_variant_by_name,
install_variant_by_name, list_variants, show_current_variant,
set_processor, show_processor): New functions.
(_initialize_rs6000_tdep): Define new commands `set processor' and
`show processor', and call install_variant_by_name to set the
default variant.
* rs6000-nat.c: Renamed all uses of FIRST_SP_REGNUM and
LAST_SP_REGNUM to FIRST_UISA_SP_REGNUM and LAST_UISA_SP_REGNUM, with
some concomitant formatting changes.
* configure.in: Accept the `--with-cpu' flag, to specify a default
processor variant.
* acconfig.h: Provide a blurb for TARGET_CPU_DEFAULT, which is set
by configure's `--with-cpu' flag.
* config.in, configure: Regenerated.
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.
the stack frame. Their offset from the previous stack frame is in
fdata.gpr_offset and fdata.fpr_offset, not fdata.offset.
(gdb.base/return.exp)
* config/rs6000/tm-rs6000.h: Doc fixes.
Convert mn10300, MIPS and powerpc/rs6000 targets to use
BREAKPOINT_FROM_PC
Delete global variable memory_breakpoint_size. Use BREAKPOINT_FROM_PC
instead.
value if the remaining length of a non-integral argument is smaller
than the register size for big-endian non-EABI mode.
* rs6000-tdep.c (branch_dest): Handle return from signal
handler function via sigreturn kernel call.