Commit Graph

44 Commits

Author SHA1 Message Date
Andrew Cagney bf75c8c166 * sparc-tdep.c (sparc_get_saved_register): Use get_prev_frame
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.
2002-04-20 03:09:28 +00:00
Andrew Cagney f4f9705a2d * gdbarch.sh (BREAKPOINT_FROM_PC): Return a const buffer.
* gdbarch.h, gdbarch.c: Regenerate.

* defs.h (breakpoint_from_pc_fn): Delete type definition.
* target.h (memory_breakpoint_from_pc): Update declaration.
* config/mcore/tm-mcore.h (mcore_breakpoint_from_p): Ditto.

* arch-utils.c (legacy_breakpoint_from_pc): Update return type.
* mcore-tdep.c (mcore_breakpoint_from_pc): Ditto.
* mem-break.c (memory_breakpoint_from_pc): Ditto.
* rs6000-tdep.c (rs6000_breakpoint_from_pc): Ditto.
* s390-tdep.c (s390_breakpoint_from_pc): Ditto
* xstormy16-tdep.c (xstormy16_breakpoint_from_pc): Ditto.
* mn10300-tdep.c (mn10300_breakpoint_from_pc): Ditto.
* mips-tdep.c (mips_breakpoint_from_pc): Ditto.
* m68hc11-tdep.c (m68hc11_breakpoint_from_pc): Ditto.
* ia64-tdep.c (ia64_breakpoint_from_pc): Ditto.
* d10v-tdep.c (d10v_breakpoint_from_pc): Ditto.
* arch-utils.c (legacy_breakpoint_from_pc): Ditto..

* mem-break.c (default_memory_insert_breakpoint): Make `bp' a
const pointer.
* monitor.c (monitor_insert_breakpoint): Ditto.
* rs6000-tdep.c (rs6000_software_single_step): Ditto for `breakp'.

* config/mcore/tm-mcore.h: Update copyright.
* mem-break.c: Ditto.
* xstormy16-tdep.c: Ditto.
2002-04-18 18:09:09 +00:00
Andrew Cagney 8227c0ffb1 * h8500-tdep.c (h8500_write_fp): Delete function.
* 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.
2002-04-06 00:02:52 +00:00
Andrew Cagney ca557f44a0 s/Linux/.../
Fix PR gdb/378.
2002-02-24 22:31:19 +00:00
Andrew Cagney b8b8b04721 From 2002-02-20 Martin Schwidefsky <schwidefsky@de.ibm.com>:
* config/s390/tm-s390.h (GDB_TARGET_IS_ESAME): Use renamed
architecture defines.
* s390-tdep.c (s390_gdbarch_init): Likewise.
2002-02-23 20:00:17 +00:00
Andrew Cagney c2f05ac92e Eliminate IEEE_FLOAT. 2002-01-20 18:05:54 +00:00
Jim Blandy 1a889ea5ea * s390-tdep.c (s390_pop_frame_regular): Make sure the saved_regs
array is actually set before we try to use it.
2001-12-20 08:55:31 +00:00
Jim Blandy 529765f487 * s390-tdep.c (s390_frame_saved_pc_nofix): If we get the saved PC
out of the return address register, cache that in the frame's
extra info, just as if we'd gotten it from the saved regs array;
that way, it's not a lie to set the saved_pc_valid flag.
2001-12-20 08:54:02 +00:00
Jim Blandy 76cc2cf029 * s390-tdep.c (s390_get_frame_info): Give orig_sp a reasonable
value, even when fextra_info->stack_bought can't be trusted,
2001-12-20 08:52:37 +00:00
Jim Blandy c5e243bbc4 * s390-tdep.c (s390_readinstruction): Don't call
info->read_memory_func to read zero bytes.  Some targets'
xfer_memory functions can't cope with that.
2001-12-20 08:50:47 +00:00
Jim Blandy 4e40929968 * gdbarch.sh (TARGET_CHAR_SIGNED): New macro.
* 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.
2001-12-20 03:26:08 +00:00
Jim Blandy b09677dcf8 * s390-tdep.c (s390_register_name): S390_LAST_REGNUM is, in fact,
the last register number, not one greater than the last register
number.

* s390-tdep.c (s390_register_virtual_type): Replace clever but
incorrect range comparison with correct, legible equivalent.
2001-12-19 23:07:53 +00:00
Jim Blandy d5d9af1069 * s390-tdep.c (s390_gdbarch_init): Revert accidentally committed
change.
2001-12-19 22:32:35 +00:00
Jim Blandy 23b7362fd7 * s390-tdep.c (s390_register_raw_size): Replace unnecessarily
obscure range comparison with legible equivalent.
2001-12-19 22:24:49 +00:00
Jim Blandy 03a013f4d3 * s390-tdep.c (s390_store_return_value): Don't convert float
values to double format when returning them; just return them in
the first half of the FP register, as the ABI specifies.
2001-12-07 22:49:25 +00:00
Jim Blandy 12bffad7cc * s390-tdep.c (s390_get_frame_info): Recognize argument register
spills that use the `stm' instruction.
(is_arg_reg): New function.
2001-12-05 22:20:00 +00:00
Jim Blandy 7666f43c32 * s390-tdep.c (s390_get_frame_info): Recognize spills of reg
arguments into their stack slots.
2001-12-05 00:20:37 +00:00
Jim Blandy 7286245e1f * s390-tdep.c (s390_get_frame_info): More doc fixes. 2001-12-05 00:07:50 +00:00
Jim Blandy 6df29de21e * s390-tdep.c (s390_get_frame_info): Doc fixes. 2001-12-04 23:51:55 +00:00
Jim Blandy 386e4208fc * s390-tdep.c (s390_get_frame_info): Don't used fextra_info to set
orig_sp if it's not initialized.
2001-12-03 18:48:54 +00:00
Jim Blandy c8f9d51ce2 Tighten up GDB's support for returning structs by value.
* s390-tdep.c (s390_use_struct_convention): New function.
(s390_gdbarch_init): Register it as the S/390's
USE_STRUCT_CONVENTION method.  Register
generic_cannot_extract_struct_value_address as our
EXTRACT_STRUCT_VALUE_ADDRESS method.
* arch-utils.c (generic_cannot_extract_struct_value_address): New
function.
* arch-utils.h: Add corresponding prototype.
2001-11-29 22:24:42 +00:00
Jim Blandy d0ad30c93c * s390-tdep.c (s390_frame_saved_pc_nofix): If the prologue didn't
save the return address register, assume that the return address
is still in there.
2001-11-29 05:02:37 +00:00
Jim Blandy 5c3cf190c0 * s390-tdep.c: Get frame chains and saved pc values properly from
dummy frames.
(s390_frame_saved_pc_nofix): if `*fi' is a dummy frame, get the
saved PC from the dummy frame's registers.
(s390_frame_chain): Same for the saved SP.
(s390_gdbarch_init): Register `generic_save_dummy_frame_tos' as
the `SAVE_DUMMY_FRAME_TOS' method, so the dummy frame's `top' gets
set correctly.
2001-11-28 03:40:50 +00:00
Jim Blandy 31c4d430c4 * s390-tdep.c (s390_frame_chain): Remember that the SP's element
of the frame's saved_regs array is special.
2001-11-28 03:36:36 +00:00
Jim Blandy b1d4dcac5b * s390-tdep.c (s390_push_dummy_frame): Delete function; it's no
longer used.
2001-11-27 22:48:26 +00:00
Jim Blandy 4ed90530f6 * s390-tdep.c (register_names): Call the general-purpose registers
`r0' -- `r15', and the floating-point registers `f0' -- `f15', to
match the assembly language.
2001-11-27 22:19:55 +00:00
Jim Blandy 20a940cc8c * s390-tdep.c: Tweak argument-passing to match GCC bugs.
(is_float_singleton, is_struct_like, is_float_like): New
functions, that isolate the weirdness.
(is_double_or_float, is_simple_arg, pass_by_copy_ref,
is_double_arg): Use is_struct_like and is_float_like, rather than
testing the type codes ourselves.
(s390_push_arguments): When passing args on the stack, align each
on to a four-byte boundary, regardless of what the type itself
needs.
2001-11-16 21:40:36 +00:00
Jim Blandy a1677dfb5e * s390-tdep.c (is_simple_arg): Structs and unions exactly eight
bytes long should be handled as DOUBLE_ARGs; don't recognize them
as SIMPLE_ARGs.
2001-11-16 02:48:30 +00:00
Jim Blandy 9a1befc916 * s390-tdep.c (s390_pop_frame_regular): On the S/390, the frame
pointer and the SP are often the same, so we can't pop the frame
by setting the SP to the FP; we need to get the old SP from
saved_regs.
2001-11-14 22:34:38 +00:00
Jim Blandy f2c6cfba86 * s390-tdep.c (s390_extract_return_value): Returned `float' values
can simply be copied bitwise from the registers into the value
object's buffer.
2001-11-14 22:29:39 +00:00
Jim Blandy 0902523724 * s390-tdep.c (s390_get_frame_info): Initialize SP's element of
the frame's saved_regs array correctly.
2001-11-14 22:14:11 +00:00
Jim Blandy 78f8b4242f * s390-tdep.c: Rewrite inferior function call code. This may
break zSeries support; that should be fixed soon.
#include "gdb_assert.h".
(is_integer_like, is_pointer_like, is_simple_arg,
pass_by_copy_ref, extend_simple_arg, is_double_arg, round_up,
round_down, alignment_of): New functions.
(s390_push_arguments): Rewritten to handle passing large arguments
by value, and to make more readable.
2001-11-13 17:47:19 +00:00
Jim Blandy 4c8287ac0c * s390-tdep.c (s390_pop_frame): Call generic_pop_current_frame, to
interact correctly with generic dummy frames.
(s390_pop_frame_regular): Move the guts of the frame-popping code
to here, to be called by generic_pop_current_frame.  Use the
frame's saved_regs array; this works for `return' as well as
inferior function calls.
2001-11-13 17:38:49 +00:00
Jim Blandy 0adb2abaa6 * s390-tdep.c (s390_gdbarch_init): Register the function
`standard_coerce_float_to_double', since GCC for the S/390 follows
the standard rules for passing floats.
2001-11-13 17:26:46 +00:00
Jim Blandy d4d0c21e8f * s390-tdep.c: Don't use a call dummy.
(s390_fix_call_dummy, s390_pc_in_call_dummy): Delete.
(s390_push_return_address): Put the address of the inferior call
breakpoint in r14.
(s390_gdbarch_init):
- Provide trivial definition of s390_call_dummy_words; register it
  with the gdbarch appropriately.
- Delete S390x_call_dummy_words.
- Gather inferior-call-related settings into a group.
- Use generic dummy frames.
- Put the inferior call breakpoint at the entry point.
- Use generic gdbarch methods: pc_in_call_dummy_at_entry_point,
  generic_push_dummy_frame, generic_fix_call_dummy.
- There is a call dummy breakpoint offset; it's zero.
2001-11-09 19:14:00 +00:00
Jim Blandy 01c464e928 * s390-nat.c: (s390_push_arguments): Write a back chain pointer
into the dummy frame, to help us get backtraces.
2001-11-09 18:58:14 +00:00
Jim Blandy 64f9bb983b * s390-tdep.c (s390_get_frame_info): Initialize got_load_addr and
got_load_len, to placate compiler.
2001-11-08 23:28:36 +00:00
Jim Blandy 8001d1e4ef * s390-tdep.c (s390_gdbarch_init): Use func_frame_chain_valid, not
file_frame_chain_valid.
2001-11-08 19:16:10 +00:00
Jim Blandy 8ac0e65a44 * s390-tdep.c (s390_get_frame_info): If the prologue loads r12
from the constant pool, but doesn't add in the constant pool's
address to it, then this function probably isn't using r12 as a
GOT pointer, and that load probably wasn't part of the prologue.
2001-11-08 19:06:04 +00:00
Jim Blandy 4c801202fe * s390-tdep.c (s390_gdbarch_init): Use the default
prepare_to_proceed function established by config/nm-linux.h;
don't try to set it to linuxthreads_prepare_to_proceed.
2001-11-08 19:03:54 +00:00
Andrew Cagney d45fc520b1 s/value_ptr/struct value */ 2001-11-01 01:21:35 +00:00
Andrew Cagney 60e6cc428d From DJ Barrow.
* s390-tdep.c: (s390_gdbarch_init): Don't initialize
find_solib_trampoline_target.
2001-10-31 22:57:46 +00:00
Andrew Cagney fd0407d670 Add explicit #include of "value.h". 2001-10-21 17:19:38 +00:00
Andrew Cagney 5769d3cd7d S/390 31 & 64 bit target and GNU/Linux native support.
Contributed by D.J. Barrow <djbarrow@de.ibm.com> of IBM.
* s390-nat.c, s390-tdep.c: New file.
* config/s390/nm-linux.h, config/s390/s390.mh: New file.
* config/s390/s390.mt, config/s390/s390x.mt: New file.
* config/s390/tm-linux.h, config/s390/tm-s390.h: New file.
* config/s390/xm-linux.h: New file.
* NEWS: Update.
* MAINTAINERS: Update.
2001-10-13 22:13:35 +00:00