aboutsummaryrefslogtreecommitdiff
path: root/gdb/windows-nat.c
diff options
context:
space:
mode:
authorChristian Biesinger <cbiesinger@google.com>2019-11-22 14:31:35 -0600
committerChristian Biesinger <cbiesinger@google.com>2019-11-26 11:53:59 -0600
commit6d91ce9a659f5b65bb6ad2d30d74250da342150c (patch)
tree2dbdd57990ccd640f63ce6f70e2daa0bd8e6b8cd /gdb/windows-nat.c
parent0dfeecca1c5014b79c34bcfec361c4b36b533623 (diff)
downloadgdb-6d91ce9a659f5b65bb6ad2d30d74250da342150c.zip
gdb-6d91ce9a659f5b65bb6ad2d30d74250da342150c.tar.gz
gdb-6d91ce9a659f5b65bb6ad2d30d74250da342150c.tar.bz2
Use safe_strerror instead of strerror where possible
This provides threadsafety. Unfortunately, since libinproctrace.so does not link to gnulib, we can't use it there, especially since it still includes the gnulib headers (so it is difficult to directly call the system strerror_r). gdb/ChangeLog: 2019-11-26 Christian Biesinger <cbiesinger@google.com> * linux-nat.c (detach_one_lwp): Call safe_strerror instead of strerror. * nto-procfs.c (nto_procfs_target::create_inferior): Likewise. * windows-nat.c (windows_nat_target::create_inferior): Likewise. gdb/gdbserver/ChangeLog: 2019-11-26 Christian Biesinger <cbiesinger@google.com> * debug.c (debug_set_output): Call safe_strerror instead of strerror. * linux-low.c (attach_proc_task_lwp_callback): Likewise. (linux_kill_one_lwp): Likewise. (linux_detach_one_lwp): Likewise. (linux_wait_for_event_filtered): Likewise. (store_register): Likewise. * lynx-low.c (lynx_attach): Likewise. * mem-break.c (insert_memory_breakpoint): Likewise. (remove_memory_breakpoint): Likewise. (delete_fast_tracepoint_jump): Likewise. (set_fast_tracepoint_jump): Likewise. (uninsert_fast_tracepoint_jumps_at): Likewise. (reinsert_fast_tracepoint_jumps_at): Likewise. * nto-low.c (nto_xfer_memory): Likewise. (nto_resume): Likewise. Change-Id: I9e259cdcaa6e11bbcc4ee6bdc5b7127d73e11abe
Diffstat (limited to 'gdb/windows-nat.c')
-rw-r--r--gdb/windows-nat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
index fdc21f3..d778282 100644
--- a/gdb/windows-nat.c
+++ b/gdb/windows-nat.c
@@ -2710,7 +2710,7 @@ windows_nat_target::create_inferior (const char *exec_file,
redirect_inferior_handles (allargs, allargs_copy,
&fd_inp, &fd_out, &fd_err);
if (errno)
- warning (_("Error in redirection: %s."), strerror (errno));
+ warning (_("Error in redirection: %s."), safe_strerror (errno));
else
errno = e;
allargs_len = strlen (allargs_copy);