summaryrefslogtreecommitdiff
path: root/gdb/windows-nat.c
Commit message (Collapse)AuthorAgeFilesLines
* * aarch64-linux-nat.c: Replace PIDGET with ptid_get_pid.Luis Machado2013-09-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace TIDGET with ptid_get_lwp. Replace GET_LWP with ptid_get_lwp. * aix-thread.c (BUILD_THREAD, BUILD_LWP): Remove. Replace BUILD_THREAD with ptid_build. Replace BUILD_LWP with ptid_build. Replace PIDGET with ptid_get_pid. Replace TIDGET with ptid_get_lwp. * alphabsd-nat.c: Replace PIDGET with ptid_get_pid. * amd64-linux-nat.c: Replace PIDGET with ptid_get_pid. Replace TIDGET with ptid_get_lwp. * amd64bsd-nat.c: Replace PIDGET with ptid_get_pid. * arm-linux-nat.c: Replace PIDGET with ptid_get_pid. Replace TIDGET with ptid_get_lwp. Replace GET_LWP with ptid_get_lwp. * armnbsd-nat.c: Replace PIDGET with ptid_get_pid. * auxv.c: Likewise. * breakpoint.c: Likewise. * common/ptid.c (ptid_is_pid): Condense check for null_ptid and minus_one_ptid. (ptid_lwp_p): New function. (ptid_tid_p): New function. * common/ptid.h: Update comments for accessors. (ptid_lwp_p): New prototype. (ptid_tid_p): New prototype. * defs.h (PIDGET, TIDGET, MERGEPID): Do not define. * gcore.c: Replace PIDGET with ptid_get_pid. * gdbthread.h: Likewise. * gnu-nat.c: Likewise. * hppa-linux-nat.c: Replace PIDGET with ptid_get_pid. Replace TIDGET with ptid_get_lwp. * hppabsd-nat.c: Replace PIDGET with ptid_get_pid. * hppanbsd-nat.c: Likewise. * i386-linux-nat.c: Replace PIDGET with ptid_get_pid. Replace TIDGET with ptid_get_lwp. * i386bsd-nat.c: Replace PIDGET with ptid_get_pid. * ia64-linux-nat.c: Replace PIDGET with ptid_get_pid. * infcmd.c: Likewise. * inferior.h: Likewise. * inflow.c: Likewise. * infrun.c: Likewise. * linux-fork.c: Likewise. * linux-nat.c: Replace PIDGET with ptid_get_pid. Replace GET_PID with ptid_get_pid. Replace is_lwp with ptid_lwp_p. Replace GET_LWP with ptid_get_lwp. Replace BUILD_LWP with ptid_build.
* Fix small indentation error in last commitPierre Muller2013-09-021-2/+2
|
* * windows-nat.c (windows_xfer_memory): Handle ERROR_PARTIAL_COPYPierre Muller2013-09-021-1/+9
| | | | error code.
* * windows-nat.c (windows_xfer_memory): Fix compilation failurePierre Muller2013-09-021-4/+4
| | | | by use of plongest function.
* windows-nat.c: Don't install a deprecated_xfer_memory method.Pedro Alves2013-08-271-22/+17
| | | | | | | | | | | | | | | | This stops another target from installing a target_ops->deprecated_xfer_memory method. Tested on native MinGW. gdb/ 2013-08-27 Pedro Alves <palves@redhat.com> * windows-nat.c (windows_xfer_memory): Adjust prototype to follow xfer_partial's interface. Return TARGET_XFER_E_IO on error. (windows_xfer_partial): Defer TARGET_OBJECT_MEMORY handling to windows_xfer_memory directly. (init_windows_ops): Don't install a deprecated_xfer_memory method.
* Normalize on PATH_MAX instead of MAXPATHLEN throughout.Pedro Alves2013-07-011-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the pathmax gnulib module in place, we can use PATH_MAX consistently throughout, instead of the current mixbag of PATH_MAX and MAXPATHLEN uses. It's no longer necessary to include sys/param.h (supposedly, I can't check all ports touched here) for MAXPATHLEN. Don't remove sys/param.h from GDB's configure.ac, as later tests in the file use HAVE_SYS_PARAM_H checks. Tested on x86_64 Fedora 17. Also cross-built for --host=i686-w64-mingw32, and --host=i586-pc-msdosdjgpp. gdb/ 2013-07-01 Pedro Alves <palves@redhat.com> * defs.h: Include "pathmax.h". * utils.c: Don't include sys/param.h. (gdb_realpath): Remove code that checks for MAXPATHLEN. * solib-ia64-hpux.c (ia64_hpux_handle_load_event): Use PATH_MAX instead of MAXPATHLEN. * solib-sunos.c: Don't include sys/param.h. * xcoffread.c: Don't include sys/param.h. * bsd-kvm.c: Don't include sys/param.h. * darwin-nat.c: Don't include sys/param.h. (darwin_pid_to_exec_file): Use PATH_MAX instead of MAXPATHLEN. * darwin-nat-info.c: Don't include sys/param.h. * fbsd-nat.c (fbsd_pid_to_exec_file): Use PATH_MAX instead of MAXPATHLEN. * i386obsd-nat.c: Don't include sys/param.h. * inf-child.c: Don't include sys/param.h. (inf_child_fileio_readlink): Use PATH_MAX instead of MAXPATHLEN. * linux-fork.c: Don't include sys/param.h. (fork_save_infrun_state): Use PATH_MAX instead of MAXPATHLEN. * linux-nat.c: Don't include sys/param.h. (linux_child_pid_to_exec_file, linux_proc_pending_signals) (linux_proc_pending_signals): Use PATH_MAX instead of MAXPATHLEN. * m68klinux-nat.c: Don't include sys/param.h. * nbsd-nat.c: Don't include sys/param.h. (nbsd_pid_to_exec_file): Use PATH_MAX instead of MAXPATHLEN. * ppc-linux-nat.c: Don't include sys/param.h. * rs6000-nat.c: Don't include sys/param.h. * spu-linux-nat.c. Don't include sys/param.h. * windows-nat.c: Don't include sys/param.h. * xtensa-linux-nat.c: Don't include sys/param.h. * config/i386/nm-fbsd.h: Don't include sys/param.h. gdb/gdbserver/ 2013-07-01 Pedro Alves <palves@redhat.com> * server.h: Include "pathmax.h". * linux-low.c: Don't include sys/param.h. (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of MAXPATHLEN. * win32-low.c: Don't include sys/param.h. (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
* windows-nat.c:thread_rec: Add missing empty line after var declaration.Joel Brobecker2013-06-111-0/+1
| | | | | | | gdb/ChangeLog: * window-nat.c (thread_rec): Add missing empty line after local variable declaration.
* [windows] Fix accidental change of %u -> %d in SuspendThread warning.Joel Brobecker2013-06-111-1/+1
| | | | | | | | | | | While enhancing the warning printed in when SuspendThread fails, I accidently changed the format used to print the error code from %u to %d. This patch reverts it back. gdb/ChangeLog: * windows-nat.c (thread_rec): Revert format used to print error code returned by SuspendThread from %d back to %u.
* windows: Prefix thread ID values with "0x" in debug tracesJoel Brobecker2013-06-111-10/+10
| | | | | | | | | | | | | | | | | | The windows-nat.c debug traces print the thread ID in base 16, but give no indication of it. So, in a trace like the following... gdb: kernel event for pid=4816 tid=720 code=CREATE_THREAD_DEBUG_EVENT) ... where tid is "720", it's easy to be confused and think that the thread ID is 720 rather than 0x720. This patch avoids the confusion by adding the usual "0x" prefix used for hexadecimal values. gdb/ChangeLog: * windows-nat.c (windows_continue): Add "0x" prefix for thread ID in debug trace. (get_windows_debug_event): Likewise, for all debug traces.
* windows: Add thread ID in SuspendThread error warning message.Joel Brobecker2013-06-111-2/+3
| | | | | | | | | | | | | | | | | | | | This patch adds the thread ID to a warning printed when a call to SuspendThread fails. It will help investigate issues, particularly when correlated with the various debug traces provided by the windows-nat module. For the record, the output has been changed from... warning: SuspendThread failed. (winerr 6) ... to ... warning: SuspendThread (tid=0x720) failed. (winerr 6) gdb/ChangeLog: * window-nat.c (thread_rec): Add thread ID in SuspendThread warning message.
* windows_delete_thread: Add missing space in cast expressionJoel Brobecker2013-05-301-1/+1
| | | | | | | gdb/ChangeLog: * windows-nat.c (windows_delete_thread): Add missing space in cast expression.
* Fix reporting of DLL unload events on MS-Windows.Eli Zaretskii2013-05-221-1/+0
| | | | | | | gdb/windows-nat.c (handle_unload_dll): Don't call solib_add for the unloaded DLL, it will be done by handle_solib_event. See http://sourceware.org/ml/gdb-patches/2013-05/msg00713.html for the details.
* Add missing empty line after var declarations in handle_unload_dllJoel Brobecker2013-05-201-0/+1
| | | | | | gdb/ChangeLog: * windows-nat.c (handle_unload_dll): Add missing empty line.
* Announce thread death on MS-Windows.Eli Zaretskii2013-05-041-3/+8
| | | | | | | | | * windows-nat.c (windows_delete_thread): Accept an additional argument, the thread's exit code, and announce thread death when print_thread_events is non-zero and we are deleting a thread that is not the main thread. (get_windows_debug_event): Pass thread exit code to windows_delete_thread.
* Unbreak Windows-hosted cross debugger builds.Eli Zaretskii2013-04-061-12/+0
| | | | | | | | | | * windows-nat.c (windows_get_absolute_argv0): Move from here... * mingw-hdep.c (windows_get_absolute_argv0): ...to here. Include main.h. * windows-nat.h (windows_get_absolute_argv0): Move prototype from here... * main.h (windows_get_absolute_argv0): ...to here.
* * windows-nat.c (handle_output_debug_string): Avoid typecastPierre Muller2013-03-271-1/+1
| | | | from integer of different size warning.
* windows-nat.c: Add empty line after local block variable definitions.Joel Brobecker2013-03-261-0/+2
| | | | | | | gdb/ChangeLog: * windows-nat.c (handle_output_debug_string): Add empty line after local block variable definition.
* Fix relocation of directories in the MinGW build.Eli Zaretskii2013-03-231-0/+12
| | | | | | | | | | | windows-nat.c (windows_get_absolute_argv0): New function. windows-nat.h: Add its prototype. main.c (get_init_files): Use filename_ncmp instead of strncmp. Use IS_DIR_SEPARATOR instead of looking for a character inside SLASH_STRING. Include filenames.h. (captured_main) [__MINGW32__]: Make argv[0] absolute, so that relocate_gdb_directory works when passed gdb_program_name. Include windows-nat.h.
* gdb/Jan Kratochvil2013-03-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Code cleanup. * bfd-target.c (target_bfd_xclose): Remove parameter quitting. * bsd-kvm.c (bsd_kvm_close): Likewise. * bsd-uthread.c (bsd_uthread_close): Likewise. * corelow.c (core_close): Likewise. (core_close_cleanup): Remove parameter quitting from a caller. * event-top.c (async_disconnect): Likewise. * exec.c (exec_close_1): Remove parameter quitting. * go32-nat.c (go32_close): Likewise. * linux-nat.c (linux_nat_close): Remove parameter quitting. Remove parameter quitting from a caller. * mips-linux-nat.c (super_close): Remove parameter quitting from the variable. (mips_linux_close): Remove parameter quitting. Remove parameter quitting from a caller. * monitor.c (monitor_close): Remove parameter quitting. * monitor.h (monitor_close): Likewise. * record-btrace.c (record_btrace_close): Likewise. * record-full.c (record_full_close): Likewise. * remote-m32r-sdi.c (m32r_close): Remove parameter quitting and remove it also from fprintf_unfiltered. * remote-mips.c (mips_close): Remove parameter quitting. (mips_detach): Remove parameter quitting from a caller. * remote-sim.c (gdbsim_close): Remove parameter quitting. (gdbsim_close): Remove duplicate function comment. Remove parameter quitting and remove it also from printf_filtered. * remote.c (remote_close): Remove parameter quitting. * solib-svr4.c (enable_break): Remove parameter quitting from a caller. * target.c (update_current_target): Remove parameter int from to_close de_fault. (push_target, unpush_target, pop_target): Remove parameter quitting from a caller. (pop_all_targets_above, pop_all_targets): Remove parameter quitting. Remove parameter quitting from a caller. (target_preopen): Remove parameter quitting from a caller. (target_close): Remove parameter quitting. Remove parameter quitting from a caller two times. Remove parameter quitting also from fprintf_unfiltered. * target.h (struct target_ops): Remove parameter quitting and as int from fields to_xclose and to_close. (extern struct target_ops current_target): (target_close, pop_all_targets): Remove parameter quitting. Update the comment. (pop_all_targets_above): Remove parameter quitting. * top.c (quit_target): Remove parameter quitting from a caller. * tracepoint.c (tfile_close): Remove parameter quitting. * windows-nat.c (windows_close): Remove parameter quitting.
* * windows-nat.c (handle_output_debug_string): Replace callCorinna Vinschen2013-03-201-1/+1
| | | | to string_to_core_addr with call to strtoull.
* * windows-nat.c (handle_output_debug_string): Change type of n toCorinna Vinschen2013-03-191-1/+1
| | | | SIZE_T to avoid crash on 64 bit systems.
* * windows-nat.c: Throughout, fix format strings and casts ofCorinna Vinschen2013-02-271-32/+34
| | | | | | | printf-like functions to avoid type related warnings on all platforms. (handle_output_debug_string): Fetch context information address from debug string using string_to_core_addr.
* * windows-nat.c (windows_xfer_memory): Fix debug-outputKai Tietz2013-02-191-4/+4
| | | | for LLP64.
* [native x86 GNU/Linux] Access debug register mirror from the corresponding ↵Pedro Alves2013-02-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | process. While reviewing the native AArch64 patch, I noticed a problem: On 02/06/2013 08:46 PM, Pedro Alves wrote: > >> > +static void >> > +aarch64_linux_prepare_to_resume (struct lwp_info *lwp) >> > +{ >> > + struct arch_lwp_info *info = lwp->arch_private; >> > + >> > + /* NULL means this is the main thread still going through the shell, >> > + or, no watchpoint has been set yet. In that case, there's >> > + nothing to do. */ >> > + if (info == NULL) >> > + return; >> > + >> > + if (DR_HAS_CHANGED (info->dr_changed_bp) >> > + || DR_HAS_CHANGED (info->dr_changed_wp)) >> > + { >> > + int tid = GET_LWP (lwp->ptid); >> > + struct aarch64_debug_reg_state *state = aarch64_get_debug_reg_state (); > Hmm. This is always fetching the debug_reg_state of > the current inferior, but may not be the inferior of lwp. > I see the same bug on x86. Sorry about that. I'll fix it. A natural fix would be to make xxx_get_debug_reg_state take an inferior argument, but that doesn't work because of the case where we detach breakpoints/watchpoints from the child fork, at a time there's no inferior for the child fork at all. We do a nasty hack in i386_inferior_data_get, but that relies on all callers pointing the current inferior to the correct inferior, which isn't actually being done by all callers, and I don't think we want to enforce that -- deep in the bowls of linux-nat.c, there are many cases we resume lwps behind the scenes, and it's be better to not have that code rely on global state (as it doesn't today). The fix is to decouple the watchpoints code from inferiors, making it track target processes instead. This way, we can freely keep track of the watchpoint mirrors for these processes behind the core's back. Checkpoints also play dirty tricks with swapping the process behind the inferior, so they get special treatment too in the patch (which just amounts to calling a new hook). Instead of the old hack in i386_inferior_data_get, where we returned a copy of the current inferior's debug registers mirror, as soon as we detect a fork in the target, we copy the debug register mirror from the parent to the child process. I don't have an old kernel handy to test, but I stepped through gdb doing the watchpoint removal in the fork child in the watchpoint-fork test seeing that the debug registers end up cleared in the child. I didn't find the need for linux_nat_iterate_watchpoint_lwps. If we use plain iterate_over_lwps instead, what happens is that when removing watchpoints, that iterate_over_lwps doesn't actually iterate over anything, since the fork child is not added to the lwp list until later, at detach time, in linux_child_follow_fork. And if we don't iterate over that lwp, we don't mark its debug registers as needing update. But linux_child_follow_fork takes care of doing that explicitly: child_lp = add_lwp (inferior_ptid); child_lp->stopped = 1; child_lp->last_resume_kind = resume_stop; make_cleanup (delete_lwp_cleanup, child_lp); /* CHILD_LP has new PID, therefore linux_nat_new_thread is not called for it. See i386_inferior_data_get for the Linux kernel specifics. Ensure linux_nat_prepare_to_resume will reset the hardware debug registers. It is done by the linux_nat_new_thread call, which is being skipped in add_lwp above for the first lwp of a pid. */ gdb_assert (num_lwps (GET_PID (child_lp->ptid)) == 1); if (linux_nat_new_thread != NULL) linux_nat_new_thread (child_lp); if (linux_nat_prepare_to_resume != NULL) linux_nat_prepare_to_resume (child_lp); ptrace (PTRACE_DETACH, child_pid, 0, 0); so unless I'm missing something (quite possible) it ends up all the same. But, the !detach-on-fork, and the "follow-fork child" paths should also call linux_nat_new_thread, and they don't presently. It seems to me in those cases we're not clearing debug regs correctly when that's needed. Instead of copying that bit that works around add_lwp bypassing the linux_nat_new_thread call, I thought it'd be better to add an add_initial_lwp call to be used in the case we really need to bypass linux_nat_new_thread, and make add_lwp always call linux_nat_new_thread. i386_cleanup_dregs is rewritten to forget about the current process debug mirrors, which takes cares of other i386 ports. Only a couple of extra tweaks here and there were needed, as some targets wheren't actually calling i386_cleanup_dregs. Tested on Fedora 17 x86_64 -m64/-m32. GDBserver already fetches the i386_debug_reg_state from the right process, and, it doesn't handle forks at all, so no fix is needed over there. gdb/ 2013-02-13 Pedro Alves <palves@redhat.com> * amd64-linux-nat.c (update_debug_registers_callback): Update comment. (amd64_linux_dr_set_control, amd64_linux_dr_set_addr): Use iterate_over_lwps. (amd64_linux_prepare_to_resume): Pass the lwp's pid to i386_debug_reg_state. (amd64_linux_new_fork): New function. (_initialize_amd64_linux_nat): Install amd64_linux_new_fork as linux_nat_new_fork hook, and i386_forget_process as linux_nat_forget_process hook. * i386-linux-nat.c (update_debug_registers_callback): Update comment. (amd64_linux_dr_set_control, amd64_linux_dr_set_addr): Use iterate_over_lwps. (i386_linux_prepare_to_resume): Pass the lwp's pid to i386_debug_reg_state. (i386_linux_new_fork): New function. (_initialize_i386_linux_nat): Install i386_linux_new_fork as linux_nat_new_fork hook, and i386_forget_process as linux_nat_forget_process hook. * i386-nat.c (i386_init_dregs): Delete. (i386_inferior_data, struct i386_inferior_data): Delete. (struct i386_process_info): New. (i386_process_list): New global. (i386_find_process_pid, i386_add_process, i386_process_info_get): New functions. (i386_inferior_data_get): Delete. (i386_process_info_get): New function. (i386_debug_reg_state): New parameter 'pid'. Reimplement. (i386_forget_process): New function. (i386_cleanup_dregs): Rewrite. (i386_update_inferior_debug_regs, i386_insert_watchpoint) (i386_remove_watchpoint, i386_region_ok_for_watchpoint) (i386_stopped_data_address, i386_insert_hw_breakpoint) (i386_remove_hw_breakpoint): Adjust to pass the current process id to i386_debug_reg_state. (i386_use_watchpoints): Don't register inferior data. * i386-nat.h (i386_debug_reg_state): Add new 'pid' parameter, and adjust comment. (i386_forget_process): Declare. * linux-fork.c (delete_fork): Call linux_nat_forget_process. * linux-nat.c (linux_nat_new_fork, linux_nat_forget_process_hook): New static globals. (linux_child_follow_fork): Don't call linux_nat_new_thread here. (add_initial_lwp): New, factored out from ... (add_lwp): ... this. Don't check the number of lwps before calling linux_nat_new_thread. (linux_nat_iterate_watchpoint_lwps): Delete. (linux_nat_attach): Use add_initial_lwp instead of add_lwp. (linux_handle_extended_wait): Call the linux_nat_new_fork hook on forks and vforks. (linux_nat_wait_1): Use add_initial_lwp instead of add_lwp for the initial lwp. (linux_nat_kill, linux_nat_mourn_inferior): Call linux_nat_forget_process. (linux_nat_set_new_fork, linux_nat_set_forget_process) (linux_nat_forget_process): New functions. * linux-nat.h (linux_nat_iterate_watchpoint_lwps_ftype): Delete type. (linux_nat_iterate_watchpoint_lwps): Delete declaration. (linux_nat_new_fork_ftype, linux_nat_forget_process_ftype): New types. (linux_nat_set_new_fork, linux_nat_set_forget_process) (linux_nat_forget_process): New declarations. * amd64fbsd-nat.c (super_mourn_inferior): New global. (amd64fbsd_mourn_inferior): New function. (_initialize_amd64fbsd_nat): Override to_mourn_inferior. * windows-nat.c (windows_detach): Call i386_cleanup_dregs.
* Update years in copyright notice for the GDB files.Joel Brobecker2013-01-011-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.
* * windows-nat.c (windows_xfer_shared_libraries): AvoidPierre Muller2012-12-141-5/+7
| | | | memory leak when OFFSET >= LEN_AVAIL.
* ARI fixes: Avoid sprintf function use rule.Pierre Muller2012-11-131-7/+9
| | | | | | | | | | | | | | | | | | | * charset.c (convert_between_encodings): Use xsnprintf. * cli-out.c (cli_field_int): Likewise. * cp-namespace.c (cp_lookup_nested_symbol): Likewise. * expprint.c (op_name_standard): Likewise. * frv-tdep.c (set_variant_num_gprs): Likewise. (set_variant_num_fprs): Likewise. * m68hc11-tdep.c (m68hc11_initialize_register_info): Likewise. * nto-tdep.c (nto_find_and_open_solib): Likewise. (nto_init_solib_absolute_prefix): Likewise. * source.c (init_source_path): Likewise. (print_source_lines_base): Likewise. * valprint.c (print_wchar): Likewise. * mi/mi-out.c (mi_field_int): Likewise. windows-nat.c (windows_pid_to_exec_file): Likewise. (windows_create_inferior): Likewise. (_initialize_check_for_gdb_ini): Likewise.
* * gdbarch.sh (target_gdbarch): Remove macro.Tom Tromey2012-11-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | (get_target_gdbarch): Rename to target_gdbarch. * gdbarch.c, gdbarch.h: Rebuild. * ada-tasks.c, aix-thread.c, amd64-linux-nat.c, arch-utils.c, arm-tdep.c, auxv.c, breakpoint.c, bsd-uthread.c, corefile.c, darwin-nat-info.c, dcache.c, dsrec.c, exec.c, fbsd-nat.c, filesystem.c, gcore.c, gnu-nat.c, i386-darwin-nat.c, i386-nat.c, ia64-vms-tdep.c, inf-ptrace.c, infcmd.c, jit.c, linux-nat.c, linux-tdep.c, linux-thread-db.c, m32r-rom.c, memattr.c, mep-tdep.c, microblaze-tdep.c, mips-linux-nat.c, mips-linux-tdep.c, mips-tdep.c, monitor.c, moxie-tdep.c, nto-procfs.c, nto-tdep.c, ppc-linux-nat.c, proc-service.c, procfs.c, progspace.c, ravenscar-thread.c, record.c, remote-m32r-sdi.c, remote-mips.c, remote-sim.c, remote.c, rl78-tdep.c, rs6000-nat.c, rx-tdep.c, s390-nat.c, sol-thread.c, solib-darwin.c, solib-dsbt.c, solib-frv.c, solib-ia64-hpux.c, solib-irix.c, solib-pa64.c, solib-som.c, solib-spu.c, solib-sunos.c, solib-svr4.c, solib.c, spu-linux-nat.c, spu-multiarch.c, spu-tdep.c, symfile-mem.c, symfile.c, symtab.c, target-descriptions.c, target.c, target.h, tracepoint.c, windows-nat.c, windows-tdep.c, xcoffsolib.c, cli/cli-dump.c, common/agent.c, mi/mi-interp.c, python/py-finishbreakpoint.c, python/py-inferior.c, python/python.c: Update.
* [Windows] run program with space in path to exe.Joel Brobecker2012-10-241-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following works... % gdb c:\path to exe\foo.exe (gdb) start ... unless a file or directory called "c:\path" or "c:\path to" exist. This is what happens in the latter case: (gdb) start [...] Error creating process C:\path to exe\foo.exe (error 193). This is because we are calling CreateProcess (et al) without specifying the lpApplicationName, so Windows determines the name of the executable using the second argument, which is the entire command line. This command line is a space-separated list of tokens, so the space in the path to the executable which potentially creates an ambiguity. The ambiguity is automatically resolved unless we're in the situation above. The solution, as suggested by the MSDN documentation for CreateProcess is to quote the executable name. gdb/ChangeLog: * windows-nat.c (windows_create_inferior) [!__CYGWIN__]: New local variable args_len. Quote the name of the executable when computing the command line.
* * procfs.c: Add gdb_bfd header.Pierre Muller2012-09-261-0/+1
| | | | | | | * rs6000-nat.c: Likewise. * solib-pa64.c: Likewise. * spu-linux-nat.c: Likewise. * windows-nat.c: Likewise.
* * windows-nat.c (windows_make_so): Use gdb_bfd_open.Tom Tromey2012-08-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * symfile.c (bfd_open_maybe_remote): Use gdb_bfd_open. (symfile_bfd_open): Likewise. (generic_load): Likewise. * solib.c (solib_bfd_fopen): Use gdb_bfd_open. * solib-pa64.c (pa64_solib_create_inferior_hook): Use gdb_bfd_open. * solib-darwin.c (darwin_solib_get_all_image_info_addr_at_init): Use gdb_bfd_open. * rs6000-nat.c (add_vmap): Use gdb_bfd_open. * remote-mips.c (mips_load_srec): Use gdb_bfd_open. (pmon_load_fast): Likewise. * remote-m32r-sdi.c (m32r_load): Use gdb_bfd_open. * procfs.c (insert_dbx_link_bpt_in_file): Use gdb_bfd_open. * machoread.c (macho_symfile_read_all_oso): Use gdb_bfd_open. (macho_check_dsym): Likewise. * m32r-rom.c (m32r_load): Use gdb_bfd_open. (m32r_upload_command): Likewise. * gdb_bfd.h (gdb_bfd_cache): Declare. * gdb_bfd.c (struct gdb_bfd_data): New. (gdb_bfd_cache): New global. (struct gdb_bfd_cache_search): New. (hash_bfd): New function. (eq_bfd): Likewise. (gdb_bfd_open): Likewise. (gdb_bfd_ref): Allocate a gdb_bfd_data and attach to the BFD. (gdb_bfd_unref): Remove closed BFD from cache. Update for gdb_bfd_data. * exec.c (exec_file_attach): Use gdb_bfd_open. * dsrec.c (load_srec): Use gdb_bfd_open.
* * cli/cli-dump.c (bfd_openr_with_cleanup): Use gdb_bfd_openr.Tom Tromey2012-07-231-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (bfd_openw_with_cleanup): Use gdb_bfd_openw. * corelow.c (core_open): Use gdb_bfd_fopen. * dsrec.c (load_srec): Use gdb_bfd_openr. * exec.c (exec_file_attach): Use gdb_bfd_fopen. * gcore.c (gcore_memory_sections): Use gdb_bfd_openw. * gdb_bfd.c (gdb_bfd_fopen, gdb_bfd_openr, gdb_bfd_openw) (gdb_bfd_openr_iovec, gdb_bfd_openr_next_archived_file) (gdb_bfd_fdopenr): New functions. * gdb_bfd.h (gdb_bfd_fopen, gdb_bfd_openr, gdb_bfd_openw) (gdb_bfd_openr_iovec, gdb_bfd_openr_next_archived_file) (gdb_bfd_fdopenr): Declare. * jit.c (bfd_open_from_target_memory): Use gdb_bfd_openr_iovec. * m32-rom.c (m32r_load, m32r_upload_command): Use gdb_bfd_openr. * machoread.c (macho_symfile_read_all_oso): Use gdb_bfd_openr, gdb_bfd_openr_next_archived_file. (macho_check_dsym): Use gdb_bfd_openr. (macho_add_oso_symfile): Don't call gdb_bfd_stash_filename. * procfs.c (insert_dbx_link_bpt_in_file): Use gdb_bfd_fdopenr. * remote-m32r-sdi.c (m32r_load): Use gdb_bfd_openr. * remote-mips.c (mips_load_srec, pmon_load_fast): Use gdb_bfd_openr. * remote.c (remote_bfd_open): Use gdb_bfd_openr_iovec. * rs6000-nat.c (add_vmap): Use gdb_bfd_openr, gdb_bfd_fdopenr, gdb_bfd_openr_next_archived_file. * solib-darwin.c (darwin_solib_get_all_image_info_addr_at_init): Use gdb_bfd_openr. * solib-pa64.c (pa64_solib_create_inferior_hook): Use gdb_bfd_openr. * solib-spu.c (spu_bfd_fopen): Use gdb_bfd_openr_iovec. * solib.c (solib_bfd_fopen): Use gdb_bfd_fopen. * spu-linux-nat.c (spu_bfd_open): Use gdb_bfd_openr_iovec. * symfile.c (bfd_open_maybe_remote): Use gdb_bfd_openr. (symfile_bfd_open): Use gdb_bfd_fopen. (generic_load): Use gdb_bfd_openr. * windows-nat.c (windows_make_so): Use gdb_bfd_openr.
* * bfd-target.c (target_bfd_reopen): Update.Tom Tromey2012-07-231-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cli/cli-dump.c (bfd_openr_with_cleanup) (bfd_openw_with_cleanup): Update. * corelow.c (core_open): Update. * dsrec.c (load_srec): Update. * exec.c (exec_file_attach): Update. * gcore.c (create_gcore_bfd): Update. * gdb_bfd.c (gdb_bfd_ref): Return void. (gdb_bfd_open): Update. * gdb_bfd.h (gdb_bfd_ref): Return void. Update comments. * jit.c (jit_bfd_try_read_symtab): Update. * m32r-rom.c (m32r_load, m32r_upload_command): Update. * machoread.c (macho_symfile_read_all_oso): Update. (macho_check_dsym): Update. * procfs.c (insert_dbx_link_bpt_in_file): Update. * remote-m32r-sdi.c (m32r_load): Update. * remote-mips.c (mips_load_srec, pmon_load_fast): Update. * rs6000-nat.c (add_vmap): Update. * solib-darwin.c (darwin_solib_get_all_image_info_addr_at_init): Update. * solib-pa64.c (pa64_solib_create_inferior_hook): Update. * solib-spu.c (spu_bfd_open): Update. * solib.c (solib_bfd_fopen, solib_read_symbols): Update. * spu-linux-nat.c (spu_bfd_open): Update. * symfile.c (bfd_open_maybe_remote, symfile_bfd_open) (generic_load): Update. * windows-nat.c (windows_make_so): Update.
* * dwarf2read.c (try_open_dwo_file): Use gdb_bfd_ref andTom Tromey2012-07-181-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gdb_bfd_unref. (free_dwo_file): Use gdb_bfd_unref. * cli/cli-dump.c: Include gdb_bfd.h. (bfd_openw_with_cleanup): Use gdb_bfd_ref. (bfd_openr_with_cleanup): Likewise. * windows-nat.c (windows_make_so): Use gdb_bfd_ref, gdb_bfd_unref. * utils.c: Include gdb_bfd.h. (do_bfd_close_cleanup): Use gdb_bfd_unref. * symfile.c: Include gdb_bfd.h. (separate_debug_file_exists): Use gdb_bfd_unref. (bfd_open_maybe_remote): Use gdb_bfd_ref. (symfile_bfd_open): Use gdb_bfd_ref, gdb_bfd_unref. (generic_load): Use gdb_bfd_ref. (reread_symbols): Use gdb_bfd_unref. * symfile-mem.c: Include gdb_bfd.h. (symbol_file_add_from_memory): Use make_cleanup_bfd_close. * spu-linux-nat.c (spu_bfd_open): Use gdb_bfd_ref, gdb_bfd_unref. * solib.c: Include gdb_bfd.h. (solib_bfd_fopen): Use gdb_bfd_ref. (solib_bfd_open): Use gdb_bfd_unref. (free_so_symbols): Use gdb_bfd_unref. (reload_shared_libraries_1): Use gdb_bfd_unref. * solib-spu.c: Include gdb_bfd.h. (spu_bfd_fopen): Use gdb_bfd_ref, gdb_bfd_unref. * solib-pa64.c (pa64_solib_create_inferior_hook): Use gdb_bfd_ref, gdb_bfd_unref. * solib-frv.c: Include gdb_bfd.h. (enable_break2): Use gdb_bfd_unref. * solib-dsbt.c: Include gdb_bfd.h. (enable_break2): Use gdb_bfd_unref. * solib-darwin.c: Include gdb_bfd.h. (darwin_solib_get_all_image_info_addr_at_init): Use gdb_bfd_ref, gdb_bfd_unref. (darwin_bfd_open): Use gdb_bfd_unref. * rs6000-nat.c (add_vmap): Use gdb_bfd_ref, gdb_bfd_unref. * remote-mips.c: Include gdb_bfd.h. (mips_load_srec): Use gdb_bfd_ref. (pmon_load_fast): Use gdb_bfd_ref. * remote-m32r-sdi.c: Include gdb_bfd.h. (m32r_load): Use gdb_bfd_ref. * record.c: Include gdb_bfd.h. (record_save_cleanups): Use gdb_bfd_unref. (cmd_record_save): Use gdb_bfd_unref. * procfs.c (insert_dbx_link_bpt_in_file): Use gdb_bfd_ref, gdb_bfd_unref. * objfiles.h (gdb_bfd_close_or_warn): Remove. (gdb_bfd_ref, gdb_bfd_unref): Move to gdb_bfd.h. * objfiles.c: Include gdb_bfd.h. (free_objfile): Use gdb_bfd_unref. (gdb_bfd_close_or_warn, gdb_bfd_ref, gdb_bfd_unref): Move to gdb_bfd.c. * machoread.c (macho_add_oso_symfile): Use gdb_bfd_unref. (macho_symfile_read_all_oso): Use gdb_bfd_ref, gdb_bfd_unref. (macho_check_dsym): Likewise. * m32r-rom.c: Include gdb_bfd.h. (m32r_load): Use gdb_bfd_ref. (m32r_upload_command): Use gdb_bfd_ref. * jit.c: Include gdb_bfd.h. (jit_bfd_try_read_symtab): Use gdb_bfd_ref, gdb_bfd_unref. * gdb_bfd.h: New file. * gdb_bfd.c: New file. * gcore.c: Include gdb_bfd.h. (create_gcore_bfd): Use gdb_bfd_ref. (do_bfd_delete_cleanup): Use gdb_bfd_unref. (gcore_command): Use gdb_bfd_unref. * exec.c: Include gdb_bfd.h. (exec_close): Use gdb_bfd_unref. (exec_close_1): Use gdb_bfd_unref. (exec_file_attach): Use gdb_bfd_ref. * elfread.c: Include gdb_bfd.h. (build_id_verify): Use gdb_bfd_unref. * dsrec.c: Include gdb_bfd.h. (load_srec): Use gdb_bfd_ref. * corelow.c: Include gdb_bfd.h. (core_close): Use gdb_bfd_unref. (core_open): Use gdb_bfd_ref. * bfd-target.c: Include gdb_bfd.h. (target_bfd_xclose): Use gdb_bfd_unref. (target_bfd_reopen): Use gdb_bfd_ref. * Makefile.in (SFILES): Add gdb_bfd.c. (HFILES_NO_SRCDIR): Add gdb_bfd.h. (COMMON_OBS): Add gdb_bfd.o.
* gdb/Pedro Alves2012-05-241-33/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2012-05-24 Pedro Alves <palves@redhat.com> PR gdb/7205 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. gdb/gdbserver/ 2012-05-24 Pedro Alves <palves@redhat.com> PR gdb/7205 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. include/gdb/ 2012-05-24 Pedro Alves <palves@redhat.com> PR gdb/7205 * gdb/signals.def: Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. sim/arm/ 2012-05-24 Pedro Alves <palves@redhat.com> PR gdb/7205 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. sim/avr/ 2012-05-24 Pedro Alves <palves@redhat.com> PR gdb/7205 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. sim/common/ 2012-05-24 Pedro Alves <palves@redhat.com> PR gdb/7205 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. sim/cr16/ 2012-05-24 Pedro Alves <palves@redhat.com> PR gdb/7205 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. sim/d10v/ 2012-05-24 Pedro Alves <palves@redhat.com> PR gdb/7205 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. sim/erc32/ 2012-05-24 Pedro Alves <palves@redhat.com> PR gdb/7205 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. sim/m32c/ 2012-05-24 Pedro Alves <palves@redhat.com> PR gdb/7205 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. sim/ppc/ 2012-05-24 Pedro Alves <palves@redhat.com> PR gdb/7205 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. sim/rl78/ 2012-05-24 Pedro Alves <palves@redhat.com> PR gdb/7205 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout. sim/rx/ 2012-05-24 Pedro Alves <palves@redhat.com> PR gdb/7205 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
* gdb/Pedro Alves2012-05-241-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2012-05-24 Pedro Alves <palves@redhat.com> PR gdb/7205 Replace target_signal with gdb_signal throughout. gdb/gdbserver/ 2012-05-24 Pedro Alves <palves@redhat.com> PR gdb/7205 Replace target_signal with gdb_signal throughout. include/gdb/ 2012-05-24 Pedro Alves <palves@redhat.com> PR gdb/7205 Replace target_signal with gdb_signal throughout. sim/common/ 2012-05-24 Pedro Alves <palves@redhat.com> PR gdb/7205 Replace target_signal with gdb_signal throughout.
* Segment register reading on Windows targets.Joel Brobecker2012-05-041-0/+20
| | | | | | | | | | | | | | | | | | | | This patch makes sure that the value of segment registers are read properly as 16bit values on Windows. gdb/ChangeLog: * windows-nat.h (segment_register_p_ftype): New typedef. (windows_set_segment_register_p): Add declaration. * windows-nat.c (segment_register_p): New static global. (windows_set_segment_register_p): New function. (do_windows_fetch_inferior_registers): Add special handling for segment registers. * amd64-windows-nat.c: #include "amd64-tdep.h". (amd64_windows_segment_register_p): New function. (_initialize_amd64_windows_nat): Call windows_set_segment_register_p. * i386-windows-nat.c: #include "i386-tdep.h". (i386_windows_segment_register_p): New function. (_initialize_i386_windows_nat): Call windows_set_segment_register_p.
* gdb/Jan Kratochvil2012-03-021-2/+12
| | | | | | | Fix -Wmissing-prototypes build. * windows-nat.c (dll_symbol_command, ctrl_c_handler): Make them static. (_initialize_windows_nat, _initialize_check_for_gdb_ini) (_initialize_loadable): New prototypes.
* * blockframe.c (find_pc_partial_function_gnu_ifunc): Change type ofDoug Evans2012-02-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "name" parameter to const char ** from char **. All callers updated. (find_pc_partial_function): Ditto. (cache_pc_function_name): Change type to const char * from char *. * symtab.h ((find_pc_partial_function_gnu_ifunc): Update. (find_pc_partial_function): Update. * alpha-tdep.h (struct gdbarch_tdep, member pc_in_sigtramp): Change type of "name" parameter to const char * from char *. All uses updated. * arch-utils.c (generic_in_solib_return_trampoline): Change type of "name" parameter to const char * from char *. * arch-utils.h (generic_in_solib_return_trampoline): Update. * frv-linux-tdep.c (frv_linux_pc_in_sigtramp): Change type of "name" parameter to const char * from char *. * gdbarch.sh (in_solib_return_trampoline): Ditto. * gdbarch.c: Regenerate. * gdbarch.h: Regenerate. * hppa-hpux-tdep.c (hppa_hpux_in_solib_return_trampoline): Update. * rs6000-tdep.c (rs6000_in_solib_return_trampoline): Update. * m32r-linux-tdep.c (m32r_linux_pc_in_sigtramp): Change type of "name" parameter to const char * from char *. * skip.c (skip_function_pc): Ditto. * sparc-sol2-tdep.c (sparc_sol2_pc_in_sigtramp): Ditto. * sparc-tdep.h (sparc_sol2_pc_in_sigtramp): Update. * sparc64fbsd-tdep.c (sparc64fbsd_pc_in_sigtramp): Ditto. * sparc64nbsd-tdep.c (sparc64nbsd_pc_in_sigtramp): Ditto. * sparc64obsd-tdep.c (sparc64obsd_pc_in_sigtramp): Ditto. * sparcnbsd-tdep.c (sparc32nbsd_pc_in_sigtramp): Ditto. * sparcobsd-tdep.c (sparc32obsd_pc_in_sigtramp): Ditto. * nbsd-tdep.c (nbsd_pc_in_sigtramp): Similary for "func_name". * nbsd-tdep.h (nbsd_pc_in_sigtramp): Update.
* Copyright year update in most files of the GDB Project.Joel Brobecker2012-01-041-2/+1
| | | | | | gdb/ChangeLog: Copyright year update in most files of the GDB Project.
* * windows-nat.c (cygwin_get_dr, cygwin_get_dr7): Add missingPierre Muller2011-12-161-0/+2
| | | | prototypes.
* gdb/Pedro Alves2011-12-141-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2011-12-14 Pedro Alves <pedro@codesourcery.com> PR threads/10729 * linux-nat.c (linux_nat_new_thread): Change parameter to an lwp pointer. (linux_nat_prepare_to_resume): New global. (lwp_free): New. (purge_lwp_list): Use it. (add_lwp): Call linux_nat_new_thread even on the first LWP. Adjust to interface change. (delete_lwp): Call lwp_free instead of xfree. (detach_callback, linux_nat_detach, resume_lwp, linux_nat_resume) (linux_handle_syscall_trap, linux_handle_extended_wait) (linux_nat_filter_event, resume_stopped_resumed_lwps): Call linux_nat_prepare_to_resume before resuming. (linux_stop_lwp): New. (linux_nat_set_new_thread): Adjust. (linux_nat_set_prepare_to_resume): New. * linux-nat.h (struct arch_lwp_info): Forward declare. (struct lwp_info) <arch_private>: New field. (linux_stop_lwp): Declare. (linux_nat_set_new_thread): Adjust. (linux_nat_set_prepare_to_resume): New. * i386-nat.c (DR_NADDR, DR_STATUS, DR_CONTROL) (struct i386_debug_reg_state): Move to i386-nat.h. (dr_mirror): Comment. (i386_debug_reg_state): New. (i386_update_inferior_debug_regs): Simplify. (i386_stopped_data_address): Use the debug register state from the inferior, not from the local cache. * i386-nat.h (struct i386_dr_low_type): Delete reset_addr and unset_status fields. New get_addr and get_control fields. (DR_FIRSTADDR, DR_LASTADDR, DR_CONTROL): Moved from i386-nat.c. (DR_NADDR, DR_STATUS): New. (struct i386_debug_reg_state): Moved from i386-nat.c. * amd64-linux-nat.c (struct arch_lwp_info): New. (amd64_linux_dr): Delete global. (amd64_linux_dr_get_addr): New. (amd64_linux_dr_get_control): New. (amd64_linux_dr_unset_status): Delete. (amd64_linux_dr_set_addr): Reimplement. (amd64_linux_dr_reset_addr): Delete. (update_debug_registers_callback): New. (amd64_linux_dr_set_control): Reimplement. (amd64_linux_dr_set_addr): Reimplement. (amd64_linux_prepare_to_resume): New. (amd64_linux_new_thread): Change parameter to an lwp pointer. Reimplement. (_initialize_amd64_linux_nat): No longer install i386_dr_low.reset_addr and i386_dr_low.unset_status. Install amd64_linux_dr_get_control as i386_dr_low.get_control. Install amd64_linux_dr_get_addr as i386_dr_low.get_addr. Install amd64_linux_prepare_to_resume. * i386-linux-nat.c (DR_FIRSTADDR, DR_LASTADDR, DR_STATUS) (DR_CONTROL): Delete. (struct arch_lwp_info): New. (i386_linux_dr): Delete global. (i386_linux_dr_set_control): Reimplement. (i386_linux_dr_get_addr): New. (i386_linux_dr_set_addr): Reimplement. (i386_linux_dr_get_control): New. (update_debug_registers_callback): New. (i386_linux_dr_unset_status): Delete. (i386_linux_dr_set_addr): Reimplement. (i386_linux_prepare_to_resume): New. (i386_linux_new_thread): Change parameter to an lwp pointer. Reimplement. (_initialize_i386_linux_nat): No longer install i386_dr_low.reset_addr and i386_dr_low.unset_status. Install i386_linux_dr_get_control as i386_dr_low.get_control. Install i386_linux_dr_get_addr as i386_dr_low.get_addr. Install i386_linux_prepare_to_resume. * arm-linux-nat.c (arm_linux_new_thread): Change parameter to an lwp pointer. Adjust. * ia64-linux-nat.c (ia64_linux_new_thread): Likewise. * mips-linux-nat.c (mips_linux_new_thread): Likewise. * ppc-linux-nat.c (ppc_linux_new_thread): Likewise. * s390-nat.c (s390_fix_watch_points): Likewise. * i386-darwin-nat.c (DR_FIRSTADDR, DR_LASTADDR, DR_STATUS) (DR_CONTROL): Delete. (i386_darwin_dr_reset_addr): Delete. (i386_darwin_dr_get_addr): New. (i386_darwin_dr_get_control): New. * go32-nat.c (go32_get_dr7, go32_get_dr): New. (init_go32_ops): No longer install i386_dr_low.reset_addr. Install go32_get_dr7 as i386_dr_low.get_control. Install go32_get_dr as i386_dr_low.get_addr. * i386bsd-nat.c (i386bsd_dr_get): New. (i386bsd_dr_reset_addr): Delete. (i386bsd_dr_get_addr): New. (i386bsd_dr_get_status): Use i386bsd_dr_get. (i386bsd_dr_get_control): New. * i386bsd-nat.h (i386bsd_dr_reset_addr): Delete. (i386bsd_dr_get_addr): New. (i386bsd_dr_get_control): New. * i386fbsd-nat.c (_initialize_i386fbsd_nat): No longer install i386_dr_low.reset_addr and i386_dr_low.unset_status. Install i386bsd_dr_get_control as i386_dr_low.get_control. Install i386bsd_dr_get_addr as i386_dr_low.get_addr. * windows-nat.c (init_windows_ops): No longer install i386_dr_low.reset_addr and i386_dr_low.unset_status. Install cygwin_get_dr7 as i386_dr_low.get_control. Install cygwin_get_dr as i386_dr_low.get_addr. (cygwin_get_dr): New. (cygwin_get_dr7): New. gdb/testsuite/ 2011-12-14 Pedro Alves <pedro@codesourcery.com> PR threads/10729 * gdb.mi/watch-nonstop.c: New file. * gdb.mi/mi-watch-nonstop.exp: New file.
* * windows-nat.c: Include wchar.h to avoid compiler warnings.Corinna Vinschen2011-10-071-3/+56
| | | | | | | (clear_win32_environment): New function for Cygwin to clear out Win32 environment. (windows_create_inferior): Prepare new environment from in_env for Cygwin, too.
* Support "set environment" and "unset environment" in MinGW builds.Eli Zaretskii2011-09-281-1/+44
| | | | | | | | * windows-nat.c (env_sort) [!__CYGWIN__]: Function restored from before the change on 2006-12-09. (windows_create_inferior) [!__CYGWIN__]: Restore code that generates the environment block for CreateProcessA, modulo the Cygwin-specific parts that are not needed here.
* 2011-05-09 Pedro Alves <pedro@codesourcery.com>Pedro Alves2011-05-091-1/+1
| | | | | | | | | | | | | | | * inferior.h (wait_for_inferior): Remove `thread_exec_as_sigtrap' parameter. * infrun.c (proceed, start_remote): Adjust. (wait_for_inferior): Remove `thread_exec_as_sigtrap' parameter, and adjust to not handle it. * solib-irix.c (irix_solib_create_inferior_hook): Adjust. * solib-osf.c (osf_solib_create_inferior_hook): Adjust. * solib-sunos.c (sunos_solib_create_inferior_hook): Adjust. * solib-svr4.c (svr4_solib_create_inferior_hook): Adjust. * windows-nat.c (do_initial_windows_stuff): Adjust. * infcmd.c (attach_command): Adjust. (notice_new_inferior): Adjust.
* gdbTom Tromey2011-04-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * windows-tdep.c (windows_xfer_shared_library): * windows-nat.c (get_module_name, windows_make_so): * v850-tdep.c (v850_handle_pushm): * utils.c (null_cleanup, gdb_realpath): * ui-out.c (get_next_header): * tracepoint.c (clear_traceframe_info): * symtab.c (lookup_symtab): * serial.h (struct serial_ops): * mipsread.c (read_alphacoff_dynamic_symtab): * infcmd.c (print_return_value): * ia64-linux-tdep.c (ia64_linux_sigcontext_register_address): * f-exp.y (parse_number): * exceptions.c (catch_exceptions): * dummy-frame.c (dummy_frame_this_id): * defs.h (struct cleanup): * breakpoint.c (disable_breakpoints_in_unloaded_shlib): * arm-tdep.c (arm_push_dummy_call): * amd64-tdep.h (amd64_collect_xsave): * amd64-tdep.c (amd64_collect_xsave): * alpha-tdep.c (alpha_heuristic_frame_unwind_cache): * README (typing): Remove duplicate words. * cli/cli-decode.c (lookup_cmd_composition): Add comma. * infrun.c (siginfo_value_read): Fix typo. * solib-frv.c (frv_fdpic_find_global_pointer): Likewise. * top.c (source_line_number): Add comma. gdb/doc * gdbint.texinfo (Register Information Functions): Remove duplicate "the". * gdb.texinfo (Emacs): Remove duplicate "to". (GDB/MI Variable Objects): Remove duplicate "the". (General Query Packets): Likewise. gdb/testsuite * gdb.mi/mi-nsmoribund.exp: * gdb.hp/gdb.objdbg/objdbg01.exp: * gdb.base/structs.exp (test_struct_returns): * gdb.base/call-sc.exp (test_scalar_returns): * gdb.base/bigcore.exp: Remove duplicate words. gdb/gdbserver * win32-low.c (handle_load_dll): Remove duplicate "the".
* Remove support for old Cygwin 1.5 versions.Pierre Muller2011-04-071-17/+0
| | | | | | | * remote-fileio.c: Remove macros used to emulate new cygwin_conv_path function on old Cygwin version. * windows-nat.c: Remove cygwin version check and always define __USEWIDE for Cygwin compilation.
* 2011-03-23 Kai Tietz <ktietz@redhat.com>Kai Tietz2011-03-231-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * breakpoint.c (clear_command): Use filename_cmp instead of strcmp for comparison. * buildsym.c (watch_main_source_file_lossage): Likewise. (patch_subfile_names): Use IS_DIR_SEPARATOR instead of checking just for slash. * dbxread.c (read_dbx_symtab): Use lbasename instead of strrchr and filename_cmp instead of strcmp for filenames. (add_old_header_file): Use filename_cmp instead of strcmp for comparison. * exec.c (exec_set_section_address): Likewise. * macrotab.c (macro_lookup_inclusion): Likewise. (macro_lookup_inclusion): Likewise. * elfread.c (_initialize_elfread): Likewise. (elfstab_offset_sections): Likewise. (elfstab_offset_sections): Use lbasename instead of strrchr. * mdebugread.c (parse_partial_symbols): Likewise. (arse_partial_symbols): Use filename_(n)cmp instead of str(n)cmp for comparison. * minsyms.c (lookup_minimal_symbol): Likewise. * psymtab.c (read_psymtabs_with_filename): Likewise. * solib.c (solib_read_symbols): Likewise. (reload_shared_libraries_1): Likewise. * symmisc.c (maintenance_print_symbols): Likewise. * symfile.c (separate_debug_file_exists): Likewise. (reread_symbols): Likewise. (find_separate_debug_file_by_debuglink): Likewise. * remote-fileio.c (remote_fileio_func_rename): Likewise. * source.c (add_path): Likewise. * symtab.c (filename_seen): Likewise. (file_matches): Likewise. (print_symbol_info): Likewise. (maybe_add_partial_symtab_filename): Likewise. (make_source_files_completion_list): Likewise. * xml-syscall.c (init_sysinfo): Likewise. * windows-nat.c (_initialize_check_for_gdb_ini): Use IS_DIR_SEPARATOR for checking for trailing path separator.
* Fix ARI warnings about new lines at the end of messages, whichPierre Muller2011-03-161-1/+1
| | | | | | | | | | | | | | | | | are unneeded as there is a new line added at the end of the message automatically. * darwin-nat.c (darwin_stop_inferior): Ditto. * dec-thread.c (dec_thread_get_ada_task_ptid): Ditto. * dfp.c (decimal_to_number): Ditto. * exec.c (print_section_info): Ditto. * i386-darwin-nat.c (darwin_set_sstep): Ditto. * osdata.c (get_osdata): Ditto. * record.c (bfdcore_write): Ditto. * remote-mips.c (mips_readchar): Ditto. * remote.c (read_ptid): Ditto. * ser-mingw.c (ser_windows_raw): Ditto. * tracepoint.c (add_local_symbols): Ditto. * windows-nat.c (fake_create_process): Ditto.
* 2011-01-11 Michael Snyder <msnyder@vmware.com>Michael Snyder2011-01-121-109/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ui-file.c: Comment cleanup, mostly periods and spaces. * ui-file.h: Ditto. * ui-out.c: Ditto. * ui-out.h: Ditto. * utils.c: Ditto. * v850-tdep.c: Ditto. * valarith.c: Ditto. * valops.c: Ditto. * valprint.c: Ditto. * valprint.h: Ditto. * value.c: Ditto. * value.h: Ditto. * varobj.c: Ditto. * varobj.h: Ditto. * vax-tdep.c: Ditto. * vec.c: Ditto. * vec.h: Ditto. * version.h: Ditto. * windows-nat.c: Ditto. * windows-tdep.c: Ditto. * xcoffread.c: Ditto. * xcoffsolib.c: Ditto. * xml-support.c: Ditto. * xstormy16-tdep.c: Ditto. * xtensa-tdep.c: Ditto. * xtensa-tdep.h: Ditto.