aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Jaeger <aj@suse.de>2003-06-26 17:08:10 +0000
committerAndreas Jaeger <aj@suse.de>2003-06-26 17:08:10 +0000
commit8ffd9b1b7af892a9ac5ea57160d602be1dea57d2 (patch)
tree17c4890bb03f8ed9c93506e708d3b2a2e244f0d2
parente8ac10a6d24baaa047da8824433a6393cc8af7c3 (diff)
downloadgdb-8ffd9b1b7af892a9ac5ea57160d602be1dea57d2.zip
gdb-8ffd9b1b7af892a9ac5ea57160d602be1dea57d2.tar.gz
gdb-8ffd9b1b7af892a9ac5ea57160d602be1dea57d2.tar.bz2
* x86-64-tdep.c (x86_64_push_arguments): Always set %rax to number
of SSE registers so that varargs functions work. Rework handling of passing arguments on the stack. (x86_64_store_return_value): Return double and float values in SSE register.
-rw-r--r--gdb/ChangeLog234
-rw-r--r--gdb/x86-64-tdep.c101
2 files changed, 193 insertions, 142 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 0599d7c..faf1188 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,11 @@
+2003-06-26 Andreas Jaeger <aj@suse.de>
+
+ * x86-64-tdep.c (x86_64_push_arguments): Always set %rax to number
+ of SSE registers so that varargs functions work. Rework handling
+ of passing arguments on the stack.
+ (x86_64_store_return_value): Return double and float values in SSE
+ register.
+
2003-06-24 Michael Chastain <mec@shout.net>
* PROBLEMS: Document pr gdb/1091 and pr gdb/1193,
@@ -210,13 +218,13 @@
* linux-nat.h: New file.
* linux-nat.c: Include linux-nat.h.
- * lin-lwp.c: Include linux-nat.h.
+ * lin-lwp.c: Include linux-nat.h.
Move struct lwp_info def to linux-nat.h.
- * linux-proc.c: Include linux-nat.h.
+ * linux-proc.c: Include linux-nat.h.
(linux_make_note_section): Iterate over lwps instead of threads.
(linux_do_thread_registers): Use lwp instead of merged pid.
* config/nm-linux.h: Move miscelaneous def'ns to linux-nat.h.
- * Makefile.in (lin-lwp.o, linux-proc.o, linux-nat.o):
+ * Makefile.in (lin-lwp.o, linux-proc.o, linux-nat.o):
Add dependency on linux_nat_h.
2003-06-19 Theodore A. Roth <troth@openavr.org>
@@ -327,7 +335,7 @@
* h8300-tdep.c (h8300s_register_name): Enable MACH and MACL
registers for H8/300S.
(h8300_print_registers_info): Ditto.
- (h8300_gdbarch_init): Accommodate register count for H8/300S.
+ (h8300_gdbarch_init): Accommodate register count for H8/300S.
2003-06-18 Daniel Jacobowitz <drow@mvista.com>
@@ -443,7 +451,7 @@
* h8300-tdep.c (E_PSEUDO_CCR_REGNUM): New define.
(E_PSEUDO_EXR_REGNUM): Ditto.
(h8300_is_argument_spill): Check for instructions moving argument
- registers into safe registers.
+ registers into safe registers.
(h8300_skip_prologue): Check for stm instruction to push registers
used for register variables onto stack.
(gdb_print_insn_h8300): Remove.
@@ -499,7 +507,7 @@
* avr-tdep.c (avr_scan_prologue): Update comment describing the various
prologue types.
- Properly scan prologues generated by gcc with the -mcall-prologues
+ Properly scan prologues generated by gcc with the -mcall-prologues
option.
Add code to scan -mcall-prologues for mega devices.
@@ -550,7 +558,7 @@
* rdi-share/host.h (Fail): Change to a varargs function.
* remote-rdi.c (Fail): Update.
-
+
2003-06-15 Mark Kettenis <kettenis@gnu.org>
* i386-tdep.c (i386_next_regnum): Fix bounds checking.
@@ -568,7 +576,7 @@
* x86-64-tdep.c (x86_64_convert_register_p): New function.
(x86_64_init_abi): Set convert_register_p, register_to_value and
value_to_register here.
-
+
2003-06-14 Andrew Cagney <cagney@redhat.com>
* mips-tdep.c (mips_register_to_value): Make static.
@@ -673,7 +681,7 @@
* gdbarch.sh: Document what PUSH_DUMMY_CALL replaces.
* gdbarch.h, gdbarch.c: Re-generate.
-
+
2003-06-13 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh: Document what UNWIND_DUMMY_ID replaces. Clarify
@@ -945,8 +953,8 @@
2003-06-11 Jeff Johnston <jjohnstn@redhat.com>
- * doublest.c (convert_doublest_to_floatformat): When dealing
- with the implied integer bit, only alter mant_bits if we are
+ * doublest.c (convert_doublest_to_floatformat): When dealing
+ with the implied integer bit, only alter mant_bits if we are
processing a full 32 bits of mantissa.
2003-06-11 David Carlton <carlton@bactrian.org>
@@ -1062,7 +1070,7 @@
2003-06-11 Jeff Johnston <jjohnstn@redhat.com>
- * ia64-tdep.c (ia64_gdbarch_init): Set number of long double
+ * ia64-tdep.c (ia64_gdbarch_init): Set number of long double
bits to 128.
2003-06-11 Andrew Cagney <cagney@redhat.com>
@@ -1188,7 +1196,7 @@
dependencies for building remote.o.
* remote-fileio.c: New file implementing the remote File-I/O protocol.
* remote-fileio.h: New header file defining remote File-I/O interface.
- * remote.c (remote_write_bytes, remote_read_bytes): Remove
+ * remote.c (remote_write_bytes, remote_read_bytes): Remove
static storage class.
(remote_wait, remote_async_wait): Call remote_fileio_request() on
'F' packet.
@@ -1325,7 +1333,7 @@
* acinclude.m4 (gcc_AC_CHECK_DECL, (gcc_AC_CHECK_DECL): Stolen
from GCC's acinclude.m4.
* configure.in: Check for getopt's delcaration.
- * aclocal.m4, config.in, configure: Re-generate.
+ * aclocal.m4, config.in, configure: Re-generate.
* main.c (error_init): Delete declaration.
* defs.h (error_init): Declare.
* rs6000-tdep.c (rs6000_fetch_pointer_argument): Make static.
@@ -1442,7 +1450,7 @@
(OBJC_FETCH_POINTER_ARGUMENT): Shorthand macro for
using FETCH_POINTER_ARGUMENT with Objective-C method arguments.
(find_implementation, resolve_msgsend, resolve_msgsend_stret,
- resolve_msgsend_super, resolve_msgsend_super_stret):
+ resolve_msgsend_super, resolve_msgsend_super_stret):
Use it.
2003-06-07 Andrew Cagney <cagney@redhat.com>
@@ -1521,7 +1529,7 @@
* sh-tdep.c (sh_gdbarch_init): Ditto.
* rs6000-tdep.c (rs6000_gdbarch_init): Ditto.
* m68hc11-tdep.c (m68hc11_gdbarch_init): Ditto.
-
+
2003-06-07 Andrew Cagney <cagney@redhat.com>
* elfread.c (elf_symtab_read): Replace "special_local_sym_p" and
@@ -1554,7 +1562,7 @@
* win32-nat.c (solib_symbols_add): Allocate section_addrs
dynamically.
* xcoffread.c (xcoff_symfile_offsets): Avoid use of SECT_OFF_MAX.
-
+
2003-06-06 Andrew Cagney <cagney@redhat.com>
* d10v-tdep.c (struct d10v_unwind_cache): Delete "return_pc".
@@ -1566,7 +1574,7 @@
2003-06-06 Michal Ludvig <mludvig@suse.cz>
- * x86-64-tdep.c (x86_64_fill_fxsave): Pass correct regnums
+ * x86-64-tdep.c (x86_64_fill_fxsave): Pass correct regnums
to regcache_collect().
2003-06-05 J. Brobecker <brobecker@gnat.com>
@@ -1620,7 +1628,7 @@
* hppa-tdep.c (hppa_prepare_to_proceed): Remove, no longer used.
2003-06-04 Jeff Johnston <jjohnstn@redhat.com>
-
+
* acconfig.h: Add HAVE_TKILL_SYSCALL definition check.
* config.in: Regenerated.
* configure.in: Add test for syscall function and check for
@@ -1638,7 +1646,7 @@
(stop_wait_callback): Check for threads already having exited and
delete such threads fromt the lwp list when discovered.
(stop_callback): Don't assert retcode of kill call.
-
+
Roland McGrath <roland@redhat.com>
* i386-linux-nat.c (ps_get_thread_area): New function needed by
nptl libthread_db.
@@ -1651,7 +1659,7 @@
(alpha_heuristic_frame_prev_register): Likewise.
* alpha-mdebug-tdep.c (alpha_mdebug_frame_prev_register): Likewise.
- * alpha-mdebug-tdep.c (alpha_mdebug_after_prologue): Use
+ * alpha-mdebug-tdep.c (alpha_mdebug_after_prologue): Use
alpha-specific register id names.
(alpha_mdebug_frame_unwind_cache): Likewise.
(alpha_mdebug_frame_prev_register): Likewise.
@@ -1706,7 +1714,7 @@
2003-06-03 Theodore A. Roth <troth@openavr.org>
- * remote.c (init_remote_state): Compute sizeof_g_packet by
+ * remote.c (init_remote_state): Compute sizeof_g_packet by
accumulation of the size of all registers instead of blindly using
DEPRECATED_REGISTER_BYTES.
@@ -1777,7 +1785,7 @@
2003-06-02 Elena Zannoni <ezannoni@redhat.com>
- * target.h (TARGET_SYMFILE_POSTREAD): Delete unused macro.
+ * target.h (TARGET_SYMFILE_POSTREAD): Delete unused macro.
* symfile.c (reread_symbols): Delete call to TARGET_SYMFILE_POSTREAD.
(syms_from_objfile): Ditto.
@@ -1797,7 +1805,7 @@
(alpha_convert_flt_dbl, alpha_convert_dbl_flt): Remove.
(alpha_lds, alpha_sts): New.
(alpha_convert_register_p): Change from _register_convertible.
- (alpha_register_to_value): Change from _convert_to_virtual;
+ (alpha_register_to_value): Change from _convert_to_virtual;
restructure and fail for type sizes other than 4 or 8.
(alpha_value_to_register): Similarly.
(alpha_extract_return_value): Use alpha_sts.
@@ -1857,7 +1865,7 @@
* alpha-tdep.c (alpha_push_dummy_call): Use
builtin_type_ieee_double_little instead of builtin_type_double.
- * alpha-tdep.c (alpha_push_dummy_call): Handle ABI mandated
+ * alpha-tdep.c (alpha_push_dummy_call): Handle ABI mandated
sign-extension of 32-bit values.
(alpha_store_return_value): Similarly.
@@ -2782,7 +2790,7 @@
2003-05-23 Raoul Gough <RaoulGough@yahoo.co.uk>
Committed by Elena Zannoni <ezannoni@redhat.com>.
- * coffread.c(coff_symtab_read): Do relocate static symbols from PE
+ * coffread.c(coff_symtab_read): Do relocate static symbols from PE
files, don't relocate absolute symbols (and do use mst_abs).
2003-05-23 Andrew Cagney <cagney@redhat.com>
@@ -2944,7 +2952,7 @@
* c-exp.y (typebase): Remove duplicate occurence of
`SIGNED_KEYWORD LONG LONG'. Use builtin_type_long_long instead
- of lookup_signed_typename.
+ of lookup_signed_typename.
2003-05-18 Mark Kettenis <kettenis@gnu.org>
@@ -3091,13 +3099,13 @@
* Makefile.in (cp-valprint.o): Update dependencies.
2003-05-15 Jeff Johnston <jjohnstn@redhat.com>
-
+
* ia64-tdep.c: Increase max_skip_non_prologue_insns to 40.
(examine_prologue): Support looking through leaf functions, knowing
- they start with mov r2,r12. Support skipping over indirect stores
- of the input registers. Upon hitting a non-nop branch instruction
- or predicated instruction, bail out by setting lim_pc to the current
- pc value in the loop. At the end, if the lim_pc value is still
+ they start with mov r2,r12. Support skipping over indirect stores
+ of the input registers. Upon hitting a non-nop branch instruction
+ or predicated instruction, bail out by setting lim_pc to the current
+ pc value in the loop. At the end, if the lim_pc value is still
beyond our calculated value and we have trust_limit set,
use the lim_pc value.
@@ -3124,8 +3132,8 @@
declaration.
2003-05-15 David Carlton <carlton@bactrian.org>
-
- Committed by Elena Zannoni <ezannoni@redhat.com>
+
+ Committed by Elena Zannoni <ezannoni@redhat.com>
* symtab.c (lookup_symbol_aux): Delete calls to
lookup_symbol_aux_minsyms.
(lookup_symbol_aux_minsyms): Comment out function and
@@ -3326,9 +3334,9 @@
* avr-tdep.c (avr_remote_translate_xfer_address): Ditto.
2003-05-07 Jeff Johnston <jjohnstn@redhat.com>
-
- * dwarf2read.c (dwarf_decode_lines): Only use output of
- check_cu_functions() when calling record_line(). Do not update
+
+ * dwarf2read.c (dwarf_decode_lines): Only use output of
+ check_cu_functions() when calling record_line(). Do not update
the current address.
2003-05-07 Andrew Cagney <cagney@redhat.com>
@@ -3368,7 +3376,7 @@
* gdbarch.h, gdbarch.c: Re-generate.
* remote.c (remote_xfer_memory): Use
gdbarch_remote_translate_xfer_address.
-
+
2003-05-07 Jeff Johnston <jjohnstn@redhat.com>
* infrun.c (prev_pc): Move declaration ahead of proceed().
@@ -3434,7 +3442,7 @@
* config/tm-qnxnto.h: New file.
* config/i386/i386nto.mt: New file.
* config/i386/tm-i386nto.h: New file.
-
+
2003-05-04 Andrew Cagney <cagney@redhat.com>
* gdbthread.h (save_infrun_state): Drop prev_func_name parameter.
@@ -3457,7 +3465,7 @@
that REGISTER_BYTE is consistent with the regcache.
* gdbarch.sh (REGISTER_BYTE): Add a predicate.
* gdbarch.h, gdbarch.c: Regenerate.
-
+
2003-05-04 Mark Kettenis <kettenis@gnu.org>
* i387-tdep.c (fxsave_offset): Add entries for %xmm8-%xmm15.
@@ -3506,7 +3514,7 @@
(print_formatted): Call gdb_print_insn, instead of print_insn.
* Makefile.in (printcmd.o): Update dependencies.
(mcore-tdep.o, d10v-tdep.o): Ditto.
-
+
2003-05-02 Andrew Cagney <cagney@redhat.com>
* std-regs.c (value_of_builtin_frame_pc_reg): Delete #ifdef
@@ -3831,7 +3839,7 @@
2003-04-24 Adam Fedor <fedor@gnu.org>
- * objc-lang.c (FETCH_ARGUMENT, CONVERT_FUNCPTR): Remove
+ * objc-lang.c (FETCH_ARGUMENT, CONVERT_FUNCPTR): Remove
architecture dependant compilation and mark as unimplemented
(until they get put in the gdbarch vector).
@@ -3845,7 +3853,7 @@
* infcall.c (call_function_by_hand): Eliminate redundant
indentation. Move "saved_async" and "old_cleanups" to where they
are needed.
-
+
2003-04-23 Andrew Cagney <cagney@redhat.com>
* infcall.c (call_function_by_hand): Eliminate the variables "rc"
@@ -3856,7 +3864,7 @@
* infcall.c (call_function_by_hand): Move variables "start_sp",
"dummy", "sizeof_dummy1" and "dummy1" and corresponding dummy call
code to ON_STACK switch branch.
-
+
2003-04-23 Andrew Cagney <cagney@redhat.com>
* infcall.c (call_function_by_hand): Make declaration of "i",
@@ -3887,7 +3895,7 @@
* config/pa/tm-hppa.h (SOFT_FLOAT): Delete this macro.
Update all the tests using SOFT_FLOAT considering the fact that
- this macro was always set to 0.
+ this macro was always set to 0.
* config/pa/tm-hppa64.h: Update all the tests using SOFT_FLOAT
considering the fact that this macro was always set to 0.
* hppa-tdep.h (hppa_store_return_value): Likewise.
@@ -3969,7 +3977,7 @@
(i386_fp_regnum_p, i386_fpc_regnum_p, i386_sse_regnum_p,
i386_mxcsr_regnum_p): Remove redundant parentheses.
(i386_register_name): Use i386_num_register_names.
-
+
* i386-tdep.c (i386_extract_return_value,
i386_store_return_value): Correct check for availability of
floating-point registers.
@@ -4006,7 +4014,7 @@
Committed by Elena Zannoni <ezannoni@redhat.com>
* gdb_gcore.sh: New script to create a core dump of a process.
-
+
2003-04-17 Elena Zannoni <ezannoni@redhat.com>
* values.c (value_being_returned): Don't fetch the return
@@ -4015,11 +4023,11 @@
2003-04-17 Jeff Johnston <jjohnstn@redhat.com>
* thread-db.c: Reindented.
-
+
2003-04-17 Jeff Johnston <jjohnstn@redhat.com>
-
- * gdb_indent.sh: Recognize td_thrhandle_t, td_event_msg_t,
- td_thr_events_t, td_notify_t, td_thr_iter_f, and td_thrinfo_t
+
+ * gdb_indent.sh: Recognize td_thrhandle_t, td_event_msg_t,
+ td_thr_events_t, td_notify_t, td_thr_iter_f, and td_thrinfo_t
as types.
@@ -4045,7 +4053,7 @@
-
+
2003-04-16 Kevin Buettner <kevinb@redhat.com>
* rs6000-tdep.c (rs6000_gdbarch_init): For the SysV ABI, set
@@ -4383,7 +4391,7 @@
* alpha-tdep.c (alpha_init_frame_pc_first): Update.
* x86-64-tdep.h (x86_64_linux_saved_pc_after_call): Update
declaration.
-
+
2003-04-11 Andrew Cagney <cagney@redhat.com>
* i387-tdep.c: Update copyright.
@@ -4605,7 +4613,7 @@
be freed more than once, causing wild memory corruptions.
(gdb_disassembly): Look for the substring "-thread",
instead of "-threads" in the target name, to make sure to find
- the 'multi-thread' target. Also, make sure we do the right thing
+ the 'multi-thread' target. Also, make sure we do the right thing
with the "core" target.
2003-04-07 Kevin Buettner <kevinb@redhat.com>
@@ -4746,7 +4754,7 @@
* frame-unwind.h: Include "frame.h".
(struct frame_unwind): Add "type" field.
* Makefile.in (frame_unwind_h): Add $(frame_h).
-
+
2003-04-04 Andrew Cagney <cagney@redhat.com>
* x86-64-tdep.c (x86_64_unwind_dummy_id): Use frame_id_build.
@@ -4842,13 +4850,13 @@
(d10v_frame_this_id): Use the previous frame's inner most stack
address and this frame's func address for the frame ID. Use
frame_id_build. Don't analyze beyond the current instruction.
-
+
2003-04-01 Andrew Cagney <cagney@redhat.com>
* frame.h (get_frame_locals_address, get_frame_args_address):
Refer to the base address, instead of the address of the first
local or parameter.
-
+
2003-04-01 Andrew Cagney <cagney@redhat.com>
Add frame debug info addresses:
@@ -5098,7 +5106,7 @@
* valops.c (hand_function_call): Replace TARGET_WRITE_SP with
DEPRECATED_DUMMY_WRITE_SP. Call when the method is available,
instead of when push_dummy_call is not available.
-
+
2003-03-30 Andrew Cagney <cagney@redhat.com>
* infttrace.c: Include "gdbthread.h".
@@ -5138,7 +5146,7 @@
* gdbarch.sh (CALL_DUMMY_WORDS, SIZEOF_CALL_DUMMY_WORDS): Always
define.
* gdbarch.h: Regenerate.
-
+
2003-03-29 Andrew Cagney <cagney@redhat.com>
* infttrace.h: New file.
@@ -5222,7 +5230,7 @@
TARGET_WRITE_SP.
* sparc-tdep.c (sparc_push_dummy_frame): Ditto.
(sparc_pop_frame): Ditto.
-
+
2003-03-27 Andrew Cagney <cagney@redhat.com>
* NEWS: Mention removal of support for hppa*-*-bsd* and
@@ -5364,7 +5372,7 @@
* cris-tdep.c (cris_gdbarch_init): Ditto.
* m68k-tdep.c (m68k_gdbarch_init): Ditto.
* m68hc11-tdep.c (m68hc11_gdbarch_init): Ditto.
-
+
2003-03-25 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh (DEPRECATED_STORE_STRUCT_RETURN): Replace
@@ -5396,7 +5404,7 @@
* avr-tdep.c (avr_gdbarch_init): Update.
* arm-tdep.c (arm_gdbarch_init): Update.
* alpha-tdep.c (alpha_gdbarch_init): Update.
-
+
2003-03-25 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh (CALL_DUMMY_STACK_ADJUST_P): Delete.
@@ -5530,7 +5538,7 @@
* arm-tdep.c (show_arm_command): Don't print out help. Instead, show
the current setting of each value.
(_initialize_arm_tdep): Delete variable new_cmd and add new vars
- new_set and new_show. Use add_setshow_cmd_full and
+ new_set and new_show. Use add_setshow_cmd_full and
add_setshow_boolean_cmd as appropriate. Deprecate "set/show apcs32"
commands and add new version as subcommands of "set/show arm".
@@ -5542,7 +5550,7 @@
(num_disassembly_options): Renamed from num_flavor_options.
(valid_disassembly_styles): Renamed from valid_flavors.
(disassembly_style): Renamed from disassembly_flavor.
- (set_disassembly_style_sfunc): Renamed from
+ (set_disassembly_style_sfunc): Renamed from
set_disassembly_flavor_sfunc.
(set_disassembly_style): Renamed from set_disassembly_flavor.
(arm_othernames): Updated.
@@ -5796,7 +5804,7 @@
* frame.c (frame_register): Update.
(get_saved_register): Update.
* config/sparc/tm-sparc.h (DEPRECATED_GET_SAVED_REGISTER): Update.
-
+
2003-03-13 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh (DEPRECATED_POP_FRAME): Replace POP_FRAME.
@@ -5943,7 +5951,7 @@
* config/pa/tm-hppa.h (DEPRECATED_FRAME_SAVED_PC): Update.
* config/m68k/tm-delta68.h (DEPRECATED_FRAME_SAVED_PC): Update.
* config/m68k/tm-linux.h (DEPRECATED_FRAME_SAVED_PC): Update.
-
+
2003-03-12 Andrew Cagney <cagney@redhat.com>
Eliminate the need for POP_FRAME.
@@ -6088,7 +6096,7 @@
* config/pa/tm-hppa.h (DEPRECATED_FRAME_SAVED_PC): Update.
* config/m68k/tm-delta68.h (DEPRECATED_FRAME_SAVED_PC): Update.
* config/m68k/tm-linux.h (DEPRECATED_FRAME_SAVED_PC): Update.
-
+
2003-03-10 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh (gdbarch_unwind_pc): New method.
@@ -6136,7 +6144,7 @@
* gdbarch.sh: Don't generate two macro definitions when an
undefined macro taking no arguments.
* gdbarch.h: Regenerate.
-
+
2002-03-07 Michal Ludvig <mludvig@suse.cz>
* x86-64-tdep.c (x86_64_save_dummy_frame_tos)
@@ -6146,7 +6154,7 @@
2003-03-07 Michal Ludvig <mludvig@suse.cz>
* x86-64-tdep.c (x86_64_function_has_prologue): New function.
- (x86_64_skip_prologue): Move prologue detection to
+ (x86_64_skip_prologue): Move prologue detection to
separate function.
* x86-64-tdep.h (x86_64_function_has_prologue): New prototype.
@@ -6159,7 +6167,7 @@
* gdbarch.sh (unwind_dummy_id): New multi-arch method with
predicate.
* gdbarch.h, gdbarch.c: Regneerate.
-
+
2003-03-05 Andrew Cagney <cagney@redhat.com>
* d10v-tdep.c (struct d10v_unwind_cache): Add field "base".
@@ -6331,7 +6339,7 @@
2003-03-02 Stephane Carrez <stcarrez@nerim.fr>
- * arch-utils.c (generic_register_byte): Fix to use the loop index
+ * arch-utils.c (generic_register_byte): Fix to use the loop index
and not regnum when summing the size of all registers up to regnum.
2003-03-01 Andrew Cagney <cagney@redhat.com>
@@ -6380,13 +6388,13 @@
* avr-tdep.c (avr_gdbarch_init): Update.
* arm-tdep.c (arm_gdbarch_init): Update.
* alpha-tdep.c (alpha_gdbarch_init): Update.
-
+
2003-03-01 Andrew Cagney <cagney@redhat.com>
* main.c (captured_main): Add OPT_WINDOWS and OPT_NOWINDOWS to
option enum and switch. When no windows, set the interpreter to
INTERP_CONSOLE.
-
+
2003-03-01 Andrew Cagney <cagney@redhat.com>
* main.c (captured_main): Replace magic option characters with an
@@ -6555,7 +6563,7 @@
* cris-tdep.c (cris_gdbarch_init): Ditto.
* avr-tdep.c (avr_gdbarch_init): Ditto.
* arm-tdep.c (arm_gdbarch_init): Ditto.
-
+
2003-02-26 Kevin Buettner <kevinb@redhat.com>
* mips-tdep.c (show_mips_abi): New function.
@@ -6563,9 +6571,9 @@
command ``show mips abi''.
2003-02-26 Jeff Johnston <jjohnstn@redhat.com>
-
+
From Elena Zannoni <ezannoni@redhat.com>
- * dbxread.c (process_one_symbol): Only record line 0 if one or
+ * dbxread.c (process_one_symbol): Only record line 0 if one or
more sline entries have been seen for the function.
2003-02-26 Michael Chastain <mec@shout.net>
@@ -6818,24 +6826,24 @@
* c-valprint.c (c_val_print): Ditto.
* expprint.c (print_subexp): Ditto.
* findvar.c (locate_var_value): Ditto.
- * infcmd.c (jump_command): Ditto.
- * linespec.c (decode_line_2, decode_compound): Ditto.
- * maint.c (maintenance_translate_address): Ditto.
- * objc-lang.c (compare_selectors, compare_classes): Ditto.
+ * infcmd.c (jump_command): Ditto.
+ * linespec.c (decode_line_2, decode_compound): Ditto.
+ * maint.c (maintenance_translate_address): Ditto.
+ * objc-lang.c (compare_selectors, compare_classes): Ditto.
* printcmd.c (build_address_symbolic, sym_info, print_frame_args):
Ditto.
- * p-valprint.c (pascal_val_print): Ditto.
- * stabsread.c (define_symbol): Ditto.
+ * p-valprint.c (pascal_val_print): Ditto.
+ * stabsread.c (define_symbol): Ditto.
* stack.c (print_frame, frame_info, print_block_frame_locals)
- (print_frame_arg_vars, return_command): Ditto.
- * symfile.c (compare_symbols, compare_psymbols): Ditto.
- * symmisc.c (print_symbol): Ditto.
+ (print_frame_arg_vars, return_command): Ditto.
+ * symfile.c (compare_symbols, compare_psymbols): Ditto.
+ * symmisc.c (print_symbol): Ditto.
* symtab.c (lookup_partial_symbol, lookup_block_symbol)
(compare_search_syms, print_symbol_info, print_msymbol_info)
- (rbreak_command): Ditto.
- * tracepoint.c (tracepoints_info): Ditto.
- * typeprint.c (typedef_print): Ditto.
- * valops.c (value_of_variable, hand_function_call): Ditto.
+ (rbreak_command): Ditto.
+ * tracepoint.c (tracepoints_info): Ditto.
+ * typeprint.c (typedef_print): Ditto.
+ * valops.c (value_of_variable, hand_function_call): Ditto.
* cli/cli-cmds.c (edit_command, list_command): Ditto.
* ada-typeprint.c: Update Copyright.
* infcmd.c, objc-lang.c, p-valprint.c, symmisc.c: Ditto.
@@ -6975,7 +6983,7 @@
instead of the absence of the "nm.h" file, to determine of the
configuration non-native.
* configure: Regenerate.
-
+
2003-02-14 Elena Zannoni <ezannoni@redhat.com>
From Brian Ford <ford@vss.fsi.com>
@@ -7083,7 +7091,7 @@
* sol-thread.c, hpux-thread.c: Include "gdb_stat.h" instead of
<sys/stat.h>.
* Makefile.in (sol-thread.o, hpux-thread.o): Update dependencies.
-
+
2003-02-06 Andrew Cagney <ac131313@redhat.com>
* Makefile.in (symm-nat.o): Update dependencies.
@@ -7139,7 +7147,7 @@
* infttrace.c (threads_continue_all_but_one): Fix precedence problem
with '&' and '!='.
(threads_continue_all_with_signals): Ditto.
-
+
2003-02-05 Jim Ingham <jingham@apple.com>
Keith Seitz <keiths@redhat.com>
Elena Zannoni <ezannoni@redhat.com>
@@ -7234,7 +7242,7 @@
2003-02-04 Andrew Cagney <ac131313@redhat.com>
- * NEWS: Note that the m32r-*-elf* is obsolete.
+ * NEWS: Note that the m32r-*-elf* is obsolete.
* monitor.c (monitor_expect): Obsolete reference to m32r.
* configure.tgt: Mark m32r-*-elf* as obsolete.
* MAINTAINERS: Mark m32k as obsolete.
@@ -7358,7 +7366,7 @@
(allocate_objfile): Call it.
* objfiles.h (terminate_minimal_symbol_table): New declaration.
(ALL_MSYMBOLS): No need to test whether (objfile)->msymbols is
- non-NULL.
+ non-NULL.
* minsyms.c (lookup_minimal_symbol_by_pc_section): To see whether
objfile has minimal symbols, compare minimal_symbol_count to zero,
instead of comparing msymbols with NULL.
@@ -7366,7 +7374,7 @@
* solib-sunos.c (solib_add_common_symbols): Call
terminate_minimal_symbol_table.
* symfile.c (reread_symbols): Same.
-
+
2003-02-03 Kevin Buettner <kevinb@redhat.com>
* s390-tdep.c (s390_address_class_type_flags)
@@ -7383,7 +7391,7 @@
* dwarf2cfi.c (pointer_encoding): Added new parameter.
* dwarf2cfi.c, dwarf2read.c: Changed all warnings and
- error messages to contain BFD filename.
+ error messages to contain BFD filename.
2003-02-02 Elena Zannoni <ezannoni@redhat.com>
@@ -7409,7 +7417,7 @@
(breakpoint_1): Use cleanup to invoke ui_out_table_end().
* cli/cli-setshow.c (cmd_show_list): Use
make_cleanup_ui_out_tuple_begin_end.
-
+
2003-02-02 Andrew Cagney <ac131313@redhat.com>
* frame.c (frame_unwind_register): New function.
@@ -7496,7 +7504,7 @@
(som_solib_add): Use.
* hppa-tdep.c (hppa_pointer_to_address_hack): New function.
* hppa-tdep.c (unwind_command): Use.
-
+
2003-02-01 Andrew Cagney <ac131313@redhat.com>
* gdb_dirent.h: Mark up valid uses of <dirent.h>, d_namelen and
@@ -7548,7 +7556,7 @@
* objc-exp.y, c-exp.y, f-exp.y: Remove PTR casts.
* utils.c: Update comments documenting legitimate uses of PTR.
-
+
* utils.c: Re-indent.
* config/djgpp/fnchange.lst: Delete nindy files.
@@ -7593,7 +7601,7 @@
elfstab_build_psymtabs.
* gdb-stabs.h (struct dbx_symfile_info): Add stab_section.
(DBX_STAB_SECTION): New macro.
- * stabsread.h (elfstab_build_psymtabs): Update prototype.
+ * stabsread.h (elfstab_build_psymtabs): Update prototype.
* symfile.c (symfile_dummy_outputs): New function.
(symfile_relocate_debug_section): New function.
* symfile.h (symfile_relocate_debug_section): Add prototype.
@@ -7678,7 +7686,7 @@
Daniel Jacobowitz <drow@mvista.com>
Fix PR gdb/961.
- * dwarf2read.c (dwarf_ranges_offset, dwarf_ranges_size): New
+ * dwarf2read.c (dwarf_ranges_offset, dwarf_ranges_size): New
variables.
(RANGES_SECTION): New.
(dwarf_ranges_buffer): New variable.
@@ -7831,7 +7839,7 @@
now pass in either a `struct section_addr_info' list to say where
each section is loaded, or a `struct section_offsets' table. Pass
these new arguments through to syms_from_objfile as appropriate.
- (symbol_file_add): Just call symbol_file_add_with_addrs_or_offsets,
+ (symbol_file_add): Just call symbol_file_add_with_addrs_or_offsets,
with the appropriate quiescent values for the new arguments.
* symfile.c: #include "gdb_assert.h".
@@ -7981,7 +7989,7 @@
(COMMON_OBS): Add frame-unwind.o.
(frame-unwind.o): Specify dependencies.
(frame.o, dummy-frame.o): Update dependencies.
-
+
2003-01-18 Andrew Cagney <ac131313@redhat.com>
* ada-valprint.c: Eliminate PTR.
@@ -7992,7 +8000,7 @@
* remote-mips.c, remote-sds.c, remote-vx.c: Ditto.
* solib-svr4.c, solib.c, stack.c, symfile.c, symfile.h: Ditto.
* symmisc.c, v850ice.c, xcoffread.c, cli/cli-script.c: Ditto.
-
+
2003-01-17 Andrew Cagney <ac131313@redhat.com>
* main.c (captured_main): Don't use PTR.
@@ -8037,7 +8045,7 @@
* breakpoint.c (until_break_command): Add new argument. Use it to
decide whether to stop only at the current frame or not.
* breakpoint.h (until_break_command): Update prototype.
- * infcmd.c (until_command): Add new argument to until_break_command
+ * infcmd.c (until_command): Add new argument to until_break_command
call.
(advance_command): New function.
(_initialize_infcmd): Update help string for 'until' command.
@@ -8078,7 +8086,7 @@
* buildsym.c (start_subfile): Obsolete comment pertinent to Cfront.
Update copyright year.
* dbxread.c(struct cont_elem): Obsolete.
- (process_later, process_now): Obsolete functions.
+ (process_later, process_now): Obsolete functions.
(read_dbx_symtab, read_ofile_symtab): Obsolete cfront support.
Update copyright year.
* gdbtypes.c (INIT_EXTRA, ADD_EXTRA): Obsolete macros.
@@ -8368,7 +8376,7 @@
* ns32k-tdep.c, s390-tdep.c, sh-tdep.c, sparc-tdep.c: Ditto.
* v850-tdep.c, vax-tdep.c, x86-64-linux-tdep.c: Ditto.
* xstormy16-tdep.c: Ditto.
-
+
2003-01-07 Andrew Cagney <cagney@redhat.com>
* alpha-tdep.c: Use get_frame_base.
@@ -8380,7 +8388,7 @@
* x86-64-linux-tdep.c, xstormy16-tdep.c: Ditto.
* config/h8500/tm-h8500.h, config/mn10200/tm-mn10200.h: Ditto.
* config/sparc/tm-sparc.h: Ditto.
-
+
2003-01-07 Andrew Cagney <cagney@redhat.com>
* frame.c (deprecated_get_frame_context): New function.
@@ -8389,7 +8397,7 @@
(deprecated_set_frame_context): Declare.
* dwarf2cfi.c (UNWIND_CONTEXT): Use deprecated_get_frame_context.
(cfi_init_extra_frame_info): Use deprecated_set_frame_context.
-
+
2003-01-07 Andrew Cagney <cagney@redhat.com>
* frame.c (deprecated_set_frame_next_hack): New function.
@@ -8495,7 +8503,7 @@
2003-01-06 Michal Ludvig <mludvig@suse.cz>
- * x86-64-linux-nat.c (i386_sse_regnum_p): Deleted. Not needed anymore
+ * x86-64-linux-nat.c (i386_sse_regnum_p): Deleted. Not needed anymore
since it is in i386-tdep.c.
2003-01-06 J. Brobecker <brobecker@gnat.com>
@@ -8826,7 +8834,7 @@
* avr-tdep.c, cris-tdep.c: Ditto.
* mcore-tdep.c, mips-tdep.c, mn10200-tdep.c: Ditto.
* sh-tdep.c, sparc-tdep.c, v850-tdep.c: Ditto.
-
+
2003-01-03 Mark Kettenis <kettenis@gnu.org>
* configure.in: Remove --enable-netrom option.
@@ -8849,7 +8857,7 @@
subscripts. Remove evil changequotes here.
* acconfig.h (TARGET_CPU_DEFAULT): Remove.
* config.in, configure: Regenerated.
-
+
* acconfig.h (DEFAULT_BFD_ARCH, DEFAULT_BFD_VEC): Remove.
* configure.in: Cleanup section that sources GDB and BFD configure
subscripts. Remove evil changequotes here.
@@ -8866,7 +8874,7 @@
* s390-tdep.c, sh-tdep.c, sparc-tdep.c, v850-tdep.c: Ditto.
* vax-tdep.c, x86-64-linux-tdep.c, xstormy16-tdep.c: Ditto.
* z8k-tdep.c: Ditto.
-
+
2003-01-02 Mark Kettenis <kettenis@gnu.org>
* configure.in: Remove UI_OUT configuration code.
diff --git a/gdb/x86-64-tdep.c b/gdb/x86-64-tdep.c
index 906ebd9..0fe2485 100644
--- a/gdb/x86-64-tdep.c
+++ b/gdb/x86-64-tdep.c
@@ -597,7 +597,15 @@ x86_64_push_arguments (struct regcache *regcache, int nargs,
{
int intreg = 0;
int ssereg = 0;
+ /* For varargs functions we have to pass the total number of SSE arguments
+ in %rax. So, let's count this number. */
+ int total_sse_args = 0;
+ /* Once an SSE/int argument is passed on the stack, all subsequent
+ arguments are passed there. */
+ int sse_stack = 0;
+ int int_stack = 0;
int i;
+ char buf[8];
static int int_parameter_registers[INT_REGS] =
{
X86_64_RDI_REGNUM, 4, /* %rdi, %rsi */
@@ -623,9 +631,7 @@ x86_64_push_arguments (struct regcache *regcache, int nargs,
int needed_sseregs;
if (!n ||
- !examine_argument (class, n, &needed_intregs, &needed_sseregs)
- || intreg / 2 + needed_intregs > INT_REGS
- || ssereg / 2 + needed_sseregs > SSE_REGS)
+ !examine_argument (class, n, &needed_intregs, &needed_sseregs))
{ /* memory class */
stack_values[stack_values_count++] = i;
}
@@ -633,6 +639,13 @@ x86_64_push_arguments (struct regcache *regcache, int nargs,
{
int j;
int offset = 0;
+
+ if (intreg / 2 + needed_intregs > INT_REGS)
+ int_stack = 1;
+ if (ssereg / 2 + needed_sseregs > SSE_REGS)
+ sse_stack = 1;
+ total_sse_args += needed_sseregs;
+
for (j = 0; j < n; j++)
{
switch (class[j])
@@ -640,38 +653,56 @@ x86_64_push_arguments (struct regcache *regcache, int nargs,
case X86_64_NO_CLASS:
break;
case X86_64_INTEGER_CLASS:
- regcache_cooked_write
- (regcache, int_parameter_registers[(intreg + 1) / 2],
- VALUE_CONTENTS_ALL (args[i]) + offset);
- offset += 8;
- intreg += 2;
+ if (int_stack)
+ stack_values[stack_values_count++] = i;
+ else
+ {
+ regcache_cooked_write
+ (regcache, int_parameter_registers[(intreg + 1) / 2],
+ VALUE_CONTENTS_ALL (args[i]) + offset);
+ offset += 8;
+ intreg += 2;
+ }
break;
case X86_64_INTEGERSI_CLASS:
- {
- LONGEST val = extract_signed_integer
- (VALUE_CONTENTS_ALL (args[i]) + offset, 4);
- regcache_cooked_write_signed
- (regcache, int_parameter_registers[intreg / 2], val);
-
- offset += 8;
- intreg++;
- break;
- }
+ if (int_stack)
+ stack_values[stack_values_count++] = i;
+ else
+ {
+ LONGEST val = extract_signed_integer
+ (VALUE_CONTENTS_ALL (args[i]) + offset, 4);
+ regcache_cooked_write_signed
+ (regcache, int_parameter_registers[intreg / 2], val);
+
+ offset += 8;
+ intreg++;
+ }
+ break;
case X86_64_SSEDF_CLASS:
case X86_64_SSESF_CLASS:
case X86_64_SSE_CLASS:
- regcache_cooked_write
- (regcache, sse_parameter_registers[(ssereg + 1) / 2],
- VALUE_CONTENTS_ALL (args[i]) + offset);
- offset += 8;
- ssereg += 2;
+ if (sse_stack)
+ stack_values[stack_values_count++] = i;
+ else
+ {
+ regcache_cooked_write
+ (regcache, sse_parameter_registers[(ssereg + 1) / 2],
+ VALUE_CONTENTS_ALL (args[i]) + offset);
+ offset += 8;
+ ssereg += 2;
+ }
break;
case X86_64_SSEUP_CLASS:
- regcache_cooked_write
- (regcache, sse_parameter_registers[ssereg / 2],
- VALUE_CONTENTS_ALL (args[i]) + offset);
- offset += 8;
- ssereg++;
+ if (sse_stack)
+ stack_values[stack_values_count++] = i;
+ else
+ {
+ regcache_cooked_write
+ (regcache, sse_parameter_registers[ssereg / 2],
+ VALUE_CONTENTS_ALL (args[i]) + offset);
+ offset += 8;
+ ssereg++;
+ }
break;
case X86_64_X87_CLASS:
case X86_64_MEMORY_CLASS:
@@ -700,6 +731,11 @@ x86_64_push_arguments (struct regcache *regcache, int nargs,
write_memory (sp, VALUE_CONTENTS_ALL (arg), len);
}
+ /* Write number of SSE type arguments to RAX to take care of varargs
+ functions. */
+ store_unsigned_integer (buf, 8, total_sse_args);
+ regcache_cooked_write (regcache, X86_64_RAX_REGNUM, buf);
+
return sp;
}
@@ -712,7 +748,8 @@ x86_64_store_return_value (struct type *type, struct regcache *regcache,
{
int len = TYPE_LENGTH (type);
- if (TYPE_CODE_FLT == TYPE_CODE (type))
+ /* First handle long doubles. */
+ if (TYPE_CODE_FLT == TYPE_CODE (type) && len == 16)
{
ULONGEST fstat;
char buf[FPU_REG_RAW_SIZE];
@@ -741,6 +778,12 @@ x86_64_store_return_value (struct type *type, struct regcache *regcache,
for the tag word is 0x3fff. */
regcache_raw_write_unsigned (regcache, FTAG_REGNUM, 0x3fff);
}
+ else if (TYPE_CODE_FLT == TYPE_CODE (type))
+ {
+ /* Handle double and float variables. */
+ regcache_cooked_write (regcache, X86_64_XMM0_REGNUM, valbuf);
+ }
+ /* XXX: What about complex floating point types? */
else
{
int low_size = REGISTER_RAW_SIZE (0);