aboutsummaryrefslogtreecommitdiff
path: root/gdb/amd64-windows-tdep.c
AgeCommit message (Collapse)AuthorFilesLines
2015-03-18Fix amd64 windows unwinding issues within MS dlls.Tristan Gingold1-36/+79
Unwind info in system dlls uses almost all possible codes, contrary to unwind info generated by gcc. A few issues have been discovered: incorrect handling of SAVE_NONVOL opcodes and incorrect in prologue range checks. Furthermore I added comments not to forget what has been investigated. gdb/ChangeLog: * amd64-windows-tdep.c (amd64_windows_find_unwind_info): Move redirection code to ... (amd64_windows_frame_decode_insns): ... Here. Fix in prologue checks. Fix SAVE_NONVOL operations. Add debug code and comments.
2015-03-06New common function "startswith"Gary Benson1-2/+2
This commit introduces a new inline common function "startswith" which takes two string arguments and returns nonzero if the first string starts with the second. It also updates the 295 places where this logic was written out longhand to use the new function. gdb/ChangeLog: * common/common-utils.h (startswith): New inline function. All places where this logic was used updated to use the above.
2015-01-01Update year range in copyright notice of all files owned by the GDB project.Joel Brobecker1-1/+1
gdb/ChangeLog: Update year range in copyright notice of all files.
2014-08-01Add debug trace in amd64-windows-tdep.c::amd64_windows_frame_decode_insnsJoel Brobecker1-0/+9
This is a trace which would have been useful when trying to understand why the debugger was not decoding the stream of unwind codes I was expecting. This patch adds a trace first informing us that we are following the unwind info to the next unwind record in that chain. gdb/ChangeLog: * amd64-windows-tdep.c (amd64_windows_frame_decode_insns): Add debug trace.
2014-08-01x64-windows: Fix extraction of chained UNWIND_INFOJoel Brobecker1-1/+1
On x86_64-windows, GDB is unable to unwind past some code in mswsock.dll. For instance: (gdb) bt #0 0x00000000778712fa in ntdll!ZwWaitForSingleObject () from C:\Windows\SYSTEM32\ntdll.dll #1 0x000007fefcfb0f75 in WSPStartup () from C:\Windows\system32\mswsock.dll Backtrace stopped: previous frame inner to this frame (corrupt stack?) The UNWIND_INFO record for frame #1's PC has a UNW_FLAG_CHAININFO flag, and so after having decoded this unwind record, GDB's decoder next tries to locate the next unwind record on the chain. Unfortunately, the location of that unwind info appears to be miscomputed. This is the expression used: chain_vma = cache->image_base + unwind_info + sizeof (ex_ui) + ((codes_count + 1) & ~1) * 2 + 8; The chain-info is expected to be right after the "Unwind codes array" which is itself after all the fields of ex_ui's struct. So the "+ 8" offset at the end should not be there. Because of that extra offset, we were reading no longer processing correct unwind info, leading the unwinder computing the wrong frame size, computing the wrong return address, etc. gdb/ChangeLog: * amd64-windows-tdep.c (amd64_windows_frame_decode_insns): Remove "+ 8" offset in computation of CHAIN_VMA.
2014-02-26change minsym representationTom Tromey1-3/+3
In a later patch we're going to change the minimal symbol address calculation to apply section offsets at the point of use. To make it simpler to catch potential problem spots, this patch changes the representation of minimal symbols and introduces new minimal-symbol-specific variants of the various accessors. This is necessary because it would be excessively ambitious to try to convert all the symbol types at once. The core of this change is just renaming a field in minimal_symbol; the rest is just a fairly mechanical rewording. 2014-02-26 Tom Tromey <tromey@redhat.com> * symtab.h (struct minimal_symbol) <mginfo>: Rename from ginfo. (MSYMBOL_VALUE, MSYMBOL_VALUE_ADDRESS, MSYMBOL_VALUE_BYTES) (MSYMBOL_BLOCK_VALUE, MSYMBOL_VALUE_CHAIN, MSYMBOL_LANGUAGE) (MSYMBOL_SECTION, MSYMBOL_OBJ_SECTION, MSYMBOL_NATURAL_NAME) (MSYMBOL_LINKAGE_NAME, MSYMBOL_PRINT_NAME, MSYMBOL_DEMANGLED_NAME) (MSYMBOL_SET_LANGUAGE, MSYMBOL_SEARCH_NAME) (MSYMBOL_MATCHES_SEARCH_NAME, MSYMBOL_SET_NAMES): New macros. * ada-lang.c (ada_main_name): Update. (ada_lookup_simple_minsym): Update. (ada_make_symbol_completion_list): Update. (ada_add_standard_exceptions): Update. * ada-tasks.c (read_atcb, ada_tasks_inferior_data_sniffer): Update. * aix-thread.c (pdc_symbol_addrs, pd_enable): Update. * amd64-windows-tdep.c (amd64_skip_main_prologue): Update. * arm-tdep.c (skip_prologue_function): Update. (arm_skip_stack_protector, arm_skip_stub): Update. * arm-wince-tdep.c (arm_pe_skip_trampoline_code): Update. (arm_wince_skip_main_prologue): Update. * auxv.c (ld_so_xfer_auxv): Update. * avr-tdep.c (avr_scan_prologue): Update. * ax-gdb.c (gen_var_ref): Update. * block.c (call_site_for_pc): Update. * blockframe.c (get_pc_function_start): Update. (find_pc_partial_function_gnu_ifunc): Update. * breakpoint.c (create_overlay_event_breakpoint): Update. (create_longjmp_master_breakpoint): Update. (create_std_terminate_master_breakpoint): Update. (create_exception_master_breakpoint): Update. (resolve_sal_pc): Update. * bsd-uthread.c (bsd_uthread_lookup_address): Update. * btrace.c (ftrace_print_function_name, ftrace_function_switched): Update. * c-valprint.c (c_val_print): Update. * coff-pe-read.c (add_pe_forwarded_sym): Update. * coffread.c (coff_symfile_read): Update. * common/agent.c (agent_look_up_symbols): Update. * dbxread.c (find_stab_function_addr): Update. (end_psymtab): Update. * dwarf2loc.c (call_site_to_target_addr): Update. (func_verify_no_selftailcall): Update. (tailcall_dump): Update. (call_site_find_chain_1): Update. (dwarf_expr_reg_to_entry_parameter): Update. * elfread.c (elf_gnu_ifunc_record_cache): Update. (elf_gnu_ifunc_resolve_by_got): Update. * f-valprint.c (info_common_command): Update. * findvar.c (read_var_value): Update. * frame.c (get_prev_frame_1): Update. (inside_main_func): Update. * frv-tdep.c (frv_skip_main_prologue): Update. (frv_frame_this_id): Update. * glibc-tdep.c (glibc_skip_solib_resolver): Update. * gnu-v2-abi.c (gnuv2_value_rtti_type): Update. * gnu-v3-abi.c (gnuv3_rtti_type): Update. (gnuv3_skip_trampoline): Update. * hppa-hpux-tdep.c (hppa32_hpux_in_solib_call_trampoline): Update. (hppa64_hpux_in_solib_call_trampoline): Update. (hppa_hpux_skip_trampoline_code): Update. (hppa64_hpux_search_dummy_call_sequence): Update. (hppa_hpux_find_import_stub_for_addr): Update. (hppa_hpux_find_dummy_bpaddr): Update. * hppa-tdep.c (hppa_symbol_address) (hppa_lookup_stub_minimal_symbol): Update. * i386-tdep.c (i386_skip_main_prologue): Update. (i386_pe_skip_trampoline_code): Update. * ia64-tdep.c (ia64_convert_from_func_ptr_addr): Update. * infcall.c (get_function_name): Update. * infcmd.c (until_next_command): Update. * jit.c (jit_breakpoint_re_set_internal): Update. (jit_inferior_init): Update. * linespec.c (minsym_found): Update. (add_minsym): Update. * linux-fork.c (info_checkpoints_command): Update. * linux-nat.c (get_signo): Update. * linux-thread-db.c (inferior_has_bug): Update. * m32c-tdep.c (m32c_return_value): Update. (m32c_m16c_address_to_pointer): Update. (m32c_m16c_pointer_to_address): Update. * m32r-tdep.c (m32r_frame_this_id): Update. * m68hc11-tdep.c (m68hc11_get_register_info): Update. * machoread.c (macho_resolve_oso_sym_with_minsym): Update. * maint.c (maintenance_translate_address): Update. * minsyms.c (add_minsym_to_hash_table): Update. (add_minsym_to_demangled_hash_table): Update. (msymbol_objfile): Update. (lookup_minimal_symbol): Update. (iterate_over_minimal_symbols): Update. (lookup_minimal_symbol_text): Update. (lookup_minimal_symbol_by_pc_name): Update. (lookup_minimal_symbol_solib_trampoline): Update. (lookup_minimal_symbol_by_pc_section_1): Update. (lookup_minimal_symbol_and_objfile): Update. (prim_record_minimal_symbol_full): Update. (compare_minimal_symbols): Update. (compact_minimal_symbols): Update. (build_minimal_symbol_hash_tables): Update. (install_minimal_symbols): Update. (terminate_minimal_symbol_table): Update. (find_solib_trampoline_target): Update. (minimal_symbol_upper_bound): Update. * mips-linux-tdep.c (mips_linux_skip_resolver): Update. * mips-tdep.c (mips_stub_frame_sniffer): Update. (mips_skip_pic_trampoline_code): Update. * msp430-tdep.c (msp430_skip_trampoline_code): Update. * objc-lang.c (selectors_info): Update. (classes_info): Update. (find_methods): Update. (find_imps): Update. (find_objc_msgsend): Update. * objfiles.c (objfile_relocate1): Update. * objfiles.h (ALL_OBJFILE_MSYMBOLS): Update. * obsd-tdep.c (obsd_skip_solib_resolver): Update. * p-valprint.c (pascal_val_print): Update. * parse.c (write_exp_msymbol): Update. * ppc-linux-tdep.c (powerpc_linux_in_dynsym_resolve_code) (ppc_linux_spe_context_lookup, ppc_elfv2_skip_entrypoint): Update. * ppc-sysv-tdep.c (convert_code_addr_to_desc_addr): Update. * printcmd.c (build_address_symbolic): Update. (sym_info): Update. (address_info): Update. * proc-service.c (ps_pglobal_lookup): Update. * psymtab.c (find_pc_sect_psymtab_closer): Update. (find_pc_sect_psymtab): Update. * python/py-framefilter.c (py_print_frame): Update. * ravenscar-thread.c (get_running_thread_id): Update. * record-btrace.c (btrace_call_history, btrace_get_bfun_name): Update. * remote.c (remote_check_symbols): Update. * rs6000-tdep.c (rs6000_skip_main_prologue): Update. (rs6000_skip_trampoline_code): Update. * sh64-tdep.c (sh64_elf_make_msymbol_special): Update. * sol2-tdep.c (sol2_skip_solib_resolver): Update. * solib-dsbt.c (lm_base): Update. * solib-frv.c (lm_base): Update. (main_got): Update. * solib-irix.c (locate_base): Update. * solib-som.c (som_solib_create_inferior_hook): Update. (som_solib_desire_dynamic_linker_symbols): Update. (link_map_start): Update. * solib-spu.c (spu_enable_break): Update. (ocl_enable_break): Update. * solib-svr4.c (elf_locate_base): Update. (enable_break): Update. * spu-tdep.c (spu_get_overlay_table): Update. (spu_catch_start): Update. (flush_ea_cache): Update. * stabsread.c (define_symbol): Update. (scan_file_globals): Update. * stack.c (find_frame_funname): Update. (frame_info): Update. * symfile.c (simple_read_overlay_table): Update. (simple_overlay_update): Update. * symmisc.c (dump_msymbols): Update. * symtab.c (fixup_section): Update. (find_pc_sect_line): Update. (skip_prologue_sal): Update. (search_symbols): Update. (print_msymbol_info): Update. (rbreak_command): Update. (MCOMPLETION_LIST_ADD_SYMBOL): New macro. (completion_list_objc_symbol): Update. (default_make_symbol_completion_list_break_on): Update. * tracepoint.c (scope_info): Update. * tui/tui-disasm.c (tui_find_disassembly_address): Update. (tui_get_begin_asm_address): Update. * valops.c (find_function_in_inferior): Update. * value.c (value_static_field): Update. (value_fn_field): Update.
2014-01-01Update Copyright year range in all files maintained by GDB.Joel Brobecker1-1/+1
2013-12-05Allow Windows UNWIND_INFO version 2.Joel Brobecker1-2/+13
We've observed in Windows 2012 that ntdll.dll contains some unwind records with the version field set to 2. This patch adjusts the decoder to accept records flagged with this version as well. Version 2 appears to still be largely undocumented at this stage. However, apart from a mysterious opcode 6, everything else still seems to remain the same. So this patch also changes the decoder to ignore those opcodes; before this change, the debugger would silently stop the decoding, and let the frame unwinder make do with what it the decoder managed to decode up to that point. It's unclear at this point what we're losing by not being able to decode that opcode. But the information does not appear to be critical, at least as far as call unwinding is concerned. gdb/ChangeLog: (from Tristan Gingold <gingold@adacore.com>) (from Joel Brobecker <brobecker@adacore.com>) * amd64-windows-tdep.c (amd64_windows_frame_decode_insns): Accept version 2. Ignore operations using opcode 6.
2013-10-01gdb/Yao Qi1-7/+2
* amd64-windows-tdep.c: Remove inclusion of "solib.h" and "solib-target.h". (amd64_windows_init_abi): Don't call set_solib_ops and set_gdbarch_iterate_over_objfiles_in_search_order. Call windows_init_abi instead. * i386-cygwin-tdep.c: Remove inclusion of "solib.h" and "solib-target.h". (i386_cygwin_init_abi): Don't call set_solib_ops, set_gdbarch_has_dos_based_file_system and set_gdbarch_iterate_over_objfiles_in_search_order. Call windows_init_abi instead. * windows-tdep.c: Include "solib.h" and "solib-target.h". (windows_init_abi): New function. (windows_iterate_over_objfiles_in_search_order): Make it static. * windows-tdep.h (windows_init_abi): Declare. (windows_iterate_over_objfiles_in_search_order): Remove declaration.
2013-09-26 Replace constant values 8 to 15 by AMD64_R8_REGNUM toPierre Muller1-2/+2
AMD64_R15_REGNUM when a register index is expected. * amd64-windows-tdep.c (amd64_windows_dummy_call_integer_regs): Substitute in array. * amd64-tdep.c (amd64_dwarf_regmap): Ditto. (amd64_push_arguments): Substitute in integer_regnum array.
2013-09-24Reimplement function calls on amd64-windowsJoel Brobecker1-32/+232
This patch provides a standalone implementation of function calls on amd64-windows, instead of providing some bits and pieces hooking into the function call implementation meant for sysV (in amd64-tdep). It makes better sense to do it this way, because the two ABIs are actually very different; for instance, the concept of argument classification, which is so central in the sysV ABI and drove the the implementation in amd64-tdep, makes no sense for Windows. It is therefore better for the Windows implementation to be completely separate, rather than rely on adaptations of the sysV implementation. gdb/ChangeLog: * amd64-tdep.c: #include "value.h" (amd64_windows_classify): Delete. (amd64_windows_passed_by_integer_register) (amd64_windows_passed_by_xmm_register) (amd64_windows_passed_by_pointer) (amd64_windows_adjust_args_passed_by_pointer) (amd64_windows_store_arg_in_reg, amd64_windows_push_arguments) (amd64_windows_push_dummy_call): New functions. (amd64_windows_init_abi): Remove setting of tdep->call_dummy_num_integer_regs, tdep->call_dummy_integer_regs, tdep->classify, tdep->memory_args_by_pointer and tdep->integer_param_regs_saved_in_caller_frame. Add call to set_gdbarch_push_dummy_call.
2013-09-022013-09-02 Tristan Gingold <gingold@adacore.com>Tristan Gingold1-1/+767
* NEWS: Add entry mentioning support for native Windows x64 SEH data. * amd64-windows-tdep.c: #include "objfiles.h", "frame-unwind.h", "coff/internal.h", "coff/i386.h", "coff/pe.h" and "libcoff.h". (struct amd64_windows_frame_cache): New struct. (amd64_windows_w2gdb_regnum): New global. (pc_in_range, amd64_windows_frame_decode_epilogue) (amd64_windows_frame_decode_insns, amd64_windows_find_unwind_info) (amd64_windows_frame_cache, amd64_windows_frame_prev_register) (amd64_windows_frame_this_id): New functions. (amd64_windows_frame_unwind): New static global. (amd64_windows_skip_prologue): New function. (amd64_windows_init_abi): Call frame_unwind_prepend_unwinder with amd64_windows_frame_unwind. Call set_gdbarch_skip_prologue with amd64_windows_skip_prologue.
2013-04-08 * minsyms.h (struct bound_minimal_symbol): New.Tom Tromey1-5/+7
(lookup_minimal_symbol_and_objfile): Return bound_minimal_symbol. Remove objfile argument. (lookup_minimal_symbol_by_pc_section, lookup_minimal_symbol_by_pc): Return bound_minimal_symbol. * minsyms.c (lookup_minimal_symbol_by_pc_1) (lookup_minimal_symbol_by_pc_section, lookup_minimal_symbol_by_pc): Return bound_minimal_symbol. (in_gnu_ifunc_stub): Update. (lookup_minimal_symbol_and_objfile): Return bound_minimal_symbol. Remove 'objfile_p' argument. (lookup_solib_trampoline_symbol_by_pc): Update. * ada-tasks.c, amd64-windows-tdep.c, arm-tdep.c, arm-wince-tdep.c, block.c, blockframe.c, breakpoint.c, btrace.c, c-valprint.c, dwarf2loc.c, elfread.c, frame.c, frv-tdep.c, glibc-tdep.c, gnu-v2-abi.c, gnu-v3-abi.c, hppa-hpux-tdep.c, i386-tdep.c, ia64-tdep.c, infcall.c, infcmd.c, jit.c, linux-fork.c, m32c-tdep.c, m68hc11-tdep.c, maint.c, mips-tdep.c, p-valprint.c, parse.c, ppc-linux-tdep.c, ppc-sysv-tdep.c, printcmd.c, rs6000-tdep.c, sh64-tdep.c, stack.c, symtab.c, tui/tui-disasm.c: Update.
2013-01-01Update years in copyright notice for the GDB files.Joel Brobecker1-1/+1
Two modifications: 1. The addition of 2013 to the copyright year range for every file; 2. The use of a single year range, instead of potentially multiple year ranges, as approved by the FSF.
2012-10-23Set default target-wide-charset setting to "UTF-16" for x86_64-windows.Joel Brobecker1-0/+10
Type wchar_t is only 2 bytes long on x86_64-windows. gdb/ChangeLog: * amd64-windows-tdep.c (amd64_windows_auto_wide_charset): New function. (amd64_windows_init_abi): Set auto_wide_charset gdbarch method to amd64_windows_auto_wide_charset.
2012-07-272012-07-27 Roland Schwingel <roland.schwingel@onevision.com>Pedro Alves1-0/+37
* amd64-windows-tdep.c: Include "frame.h". (amd64_windows_skip_trampoline_code): New function. (amd64_windows_init_abi): Add trampoline registration.
2012-06-05Windows-specific iterate_over_objfiles_in_search_orderJoel Brobecker1-0/+4
This patch sets the windows target to use their own version of the iterate_over_objfiles_in_search_order gdbarch method, in order to make global symbol searches sensitive to the current objfile. gdb/ChangeLog: * windows-tdep.h (windows_iterate_over_objfiles_in_search_order): Add declaration. * windows-tdep.c: #include "objfiles.h". (windows_iterate_over_objfiles_in_search_order): New function. * amd64-windows-tdep.c (amd64_windows_init_abi): Set iterate_over_objfiles_in_search_order gdbarch method to windows_iterate_over_objfiles_in_search_order. * i386-cygwin-tdep.c (i386_cygwin_init_abi): Likewise.
2012-05-16 gdb/Maciej W. Rozycki1-1/+1
* breakpoint.h (bp_location): Add related_address member. * inferior.h (get_return_value): Take a pointer to struct value instead of struct type for the function requested. * value.h (using_struct_return): Likewise. * gdbarch.sh (return_value): Take a pointer to struct value instead of struct type for the function requested. * breakpoint.c (set_breakpoint_location_function): Initialize related_address for bp_gnu_ifunc_resolver breakpoints. * elfread.c (elf_gnu_ifunc_resolver_return_stop): Pass the requested function's address to gdbarch_return_value. * eval.c (evaluate_subexp_standard): Pass the requested function's address to using_struct_return. * infcall.c (call_function_by_hand): Pass the requested function's address to using_struct_return and gdbarch_return_value. * infcmd.c (get_return_value): Take a pointer to struct value instead of struct type for the function requested. (print_return_value): Update accordingly. (finish_command_continuation): Likewise. * stack.c (return_command): Pass the requested function's address to using_struct_return and gdbarch_return_value. * value.c (using_struct_return): Take a pointer to struct value instead of struct type for the function requested. Pass the requested function's address to gdbarch_return_value. * python/py-finishbreakpoint.c (finish_breakpoint_object): New function_value member, replacing function_type. (bpfinishpy_dealloc): Update accordingly. (bpfinishpy_pre_stop_hook): Likewise. (bpfinishpy_init): Likewise. Record the requested function's address. * mips-tdep.c (mips_fval_reg): New enum. (mips_o32_push_dummy_call): For MIPS16 FP doubles do not swap words put in GP registers. (mips_o64_push_dummy_call): Update a comment. (mips_o32_return_value): Take a pointer to struct value instead of struct type for the function requested and use it to check if using the MIPS16 calling convention. Return the designated general purpose registers for floating-point values returned in MIPS16 mode. (mips_o64_return_value): Likewise. * ppc-tdep.h (ppc_sysv_abi_return_value): Update prototype. (ppc_sysv_abi_broken_return_value): Likewise. (ppc64_sysv_abi_return_value): Likewise. * alpha-tdep.c (alpha_return_value): Take a pointer to struct value instead of struct type for the function requested. * amd64-tdep.c (amd64_return_value): Likewise. * amd64-windows-tdep.c (amd64_windows_return_value): Likewise. * arm-tdep.c (arm_return_value): Likewise. * avr-tdep.c (avr_return_value): Likewise. * bfin-tdep.c (bfin_return_value): Likewise. * cris-tdep.c (cris_return_value): Likewise. * frv-tdep.c (frv_return_value): Likewise. * h8300-tdep.c (h8300_return_value): Likewise. (h8300h_return_value): Likewise. * hppa-tdep.c (hppa32_return_value): Likewise. (hppa64_return_value): Likewise. * i386-tdep.c (i386_return_value): Likewise. * ia64-tdep.c (ia64_return_value): Likewise. * iq2000-tdep.c (iq2000_return_value): Likewise. * lm32-tdep.c (lm32_return_value): Likewise. * m32c-tdep.c (m32c_return_value): Likewise. * m32r-tdep.c (m32r_return_value): Likewise. * m68hc11-tdep.c (m68hc11_return_value): Likewise. * m68k-tdep.c (m68k_return_value): Likewise. (m68k_svr4_return_value): Likewise. * m88k-tdep.c (m88k_return_value): Likewise. * mep-tdep.c (mep_return_value): Likewise. * microblaze-tdep.c (microblaze_return_value): Likewise. * mn10300-tdep.c (mn10300_return_value): Likewise. * moxie-tdep.c (moxie_return_value): Likewise. * mt-tdep.c (mt_return_value): Likewise. * ppc-linux-tdep.c (ppc_linux_return_value): Likewise. * ppc-sysv-tdep.c (ppc_sysv_abi_return_value): Likewise. (ppc_sysv_abi_broken_return_value): Likewise. (ppc64_sysv_abi_return_value): Likewise. * ppcnbsd-tdep.c (ppcnbsd_return_value): Likewise. * rl78-tdep.c (rl78_return_value): Likewise. * rs6000-aix-tdep.c (rs6000_return_value): Likewise. * rx-tdep.c (rx_return_value): Likewise. * s390-tdep.c (s390_return_value): Likewise. * score-tdep.c (score_return_value): Likewise. * sh-tdep.c (sh_return_value_nofpu): Likewise. (sh_return_value_fpu): Likewise. * sh64-tdep.c (sh64_return_value): Likewise. * sparc-tdep.c (sparc32_return_value): Likewise. * sparc64-tdep.c (sparc64_return_value): Likewise. * spu-tdep.c (spu_return_value): Likewise. * tic6x-tdep.c (tic6x_return_value): Likewise. * v850-tdep.c (v850_return_value): Likewise. * vax-tdep.c (vax_return_value): Likewise. * xstormy16-tdep.c (xstormy16_return_value): Likewise. * xtensa-tdep.c (xtensa_return_value): Likewise. * gdbarch.c: Regenerate. * gdbarch.h: Regenerate. gdb/testsuite/ * gdb.base/return-nodebug.exp: Also test float and double types.
2012-03-02gdb/Jan Kratochvil1-0/+3
Fix -Wmissing-prototypes build. * alpha-tdep.c (alpha_deal_with_atomic_sequence): Make it static. * amd64-darwin-tdep.c (_initialize_amd64_darwin_tdep): New prototype. * amd64-windows-tdep.c (_initialize_amd64_windows_tdep): Likewise. * arm-symbian-tdep.c (arm_symbian_skip_trampoline_code): Make it static. (_initialize_arm_symbian_tdep): New prototype. * arm-wince-tdep.c (arm_wince_skip_main_prologue): Make it static. * i386-darwin-tdep.c (_initialize_i386_darwin_tdep): New prototype. * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn): Make it static. * lm32-tdep.c (_initialize_lm32_tdep): New prototype. * microblaze-linux-tdep.c (_initialize_microblaze_linux_tdep): New prototype. * microblaze-tdep.c (microblaze_debug, microblaze_fetch_instruction) (microblaze_skip_prologue, microblaze_frame_cache): Make them static. * mips-linux-tdep.c (mips_linux_regset_from_core_section): Make it static. * moxie-tdep.c (moxie_process_record): Likewise. * remote-mips.c (mips_can_use_watchpoint, mips_insert_watchpoint) (mips_remove_watchpoint, mips_stopped_by_watchpoint): Make them static. * rl78-tdep.c (rl78_breakpoint_from_pc): Make it static. (_initialize_rl78_tdep): New prototype. * rx-tdep.c (rx_breakpoint_from_pc): Make it static. (_initialize_rx_tdep): New prototype. * solib-darwin.c (darwin_in_dynsym_resolve_code): Make it static. (_initialize_darwin_solib): New prototype. * solib-spu.c: Include solib-spu.h. (_initialize_spu_solib): New prototype. * spu-multiarch.c (_initialize_spu_multiarch): New prototype. * tic6x-tdep.c (tic6x_analyze_prologue, tic6x_skip_prologue) (tic6x_breakpoint_from_pc, tic6x_frame_unwind_cache) (tic6x_software_single_step): Make it static. (_initialize_tic6x_tdep): New prototype.
2012-01-04Copyright year update in most files of the GDB Project.Joel Brobecker1-1/+1
gdb/ChangeLog: Copyright year update in most files of the GDB Project.
2011-01-01run copyright.sh for 2011.Joel Brobecker1-1/+1
2010-09-27 * amd64-windows-tdep.c (amd64_skip_main_prologue): New function.Pierre Muller1-0/+33
(amd64_windows_init_abi): Register amd64_skip_main_prologue as gdbarch skip_main_prologue method.
2010-01-29Implement return values on amd64-windows.Joel Brobecker1-0/+55
* amd64-windows-tdep.c: #include gdbcore.h and regcache.h. (amd64_windows_return_value): New function. (amd64_windows_init_abi): Call set_gdbarch_return_value with amd64_windows_return_value.
2010-01-29amd64-windows: 32 bytes allocated on stack by caller for integer parameter ↵Joel Brobecker1-0/+1
registers * i386-tdep.h (struct gdbarch_tdep): Add new field integer_param_regs_saved_in_caller_frame. * amd64-windows-tdep.c (amd64_windows_init_abi): Set tdep->integer_param_regs_saved_in_caller_frame to 1. * amd64-tdep.c (amd64_push_dummy_call): Allocate some memory on stack if tdep->integer_param_regs_saved_in_caller_frame is set.
2010-01-29amd64-windows: memory args passed by pointer during function calls.Joel Brobecker1-0/+1
* i386-tdep.h (gdbarch_tdep): Add field memory_args_by_pointer. * amd64-tdep.c (amd64_push_arguments): Add handling of architectures where tdep->memory_args_by_pointer is non-zero. * amd64-windows-tdep.c (amd64_windows_init_abi): Set tdep->memory_args_by_pointer to 1.
2010-01-29amd64: Integer parameters in function calls on Windows.Joel Brobecker1-0/+55
gdb/ChangeLog: * i386-tdep.h (enum amd64_reg_class): New, moved here from amd64-tdep.c. (struct gdbarch_tdep): Add fields call_dummy_num_integer_regs, call_dummy_integer_regs, and classify. * amd64-tdep.h (amd64_classify): Add declaration. * amd64-tdep.c (amd64_dummy_call_integer_regs): New static constant. (amd64_reg_class): Delete, moved to i386-tdep.h. (amd64_classify): Make non-static. Move declaration to amd64-tdep.h. Replace call to amd64_classify by call to tdep->classify. (amd64_push_arguments): Get the list of registers to use for passing integer parameters from the gdbarch tdep structure, rather than using a hardcoded one. Replace calls to amd64_classify by calls to tdep->classify. (amd64_push_dummy_call): Get the register number used for the "hidden" argument from tdep->call_dummy_integer_regs. (amd64_init_abi): Initialize tdep->call_dummy_num_integer_regs and tdep->call_dummy_integer_regs. Set tdep->classify. * amd64-windows-tdep.c: Add include of gdbtypes.h. (amd64_windows_dummy_call_integer_regs): New static global. (amd64_windows_classify): New function. (amd64_windows_init_abi): Initialize tdep->call_dummy_num_integer_regs tdep->call_dummy_integer_regs and tdep->classify. gdb/testsuite/ChangeLog: * gdb.ada/call_pn: New testcase.
2010-01-01Update copyright year in most headers.Joel Brobecker1-1/+1
Automatic update by copyright.sh.
2009-01-11 * amd64-windows-nat.c, amd64-windows-tdep.c: New files.Joel Brobecker1-0/+41
* config/i386/mingw64.mh, config/i386/nm-cygwin64.h: New files. * configure.host, configure.tgt: Add handling for x86_64/windows. * config/djgpp/fnchange.lst: Add entries for amd64-windows-nat.c and amd64-windows-tdep.c.