summaryrefslogtreecommitdiff
path: root/gdb/nto-procfs.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/nto-procfs.c
parent0dfeecca1c5014b79c34bcfec361c4b36b533623 (diff)
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/nto-procfs.c')
-rw-r--r--gdb/nto-procfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/nto-procfs.c b/gdb/nto-procfs.c
index 0a199e7224..dcb0494e9c 100644
--- a/gdb/nto-procfs.c
+++ b/gdb/nto-procfs.c
@@ -1317,7 +1317,7 @@ nto_procfs_target::create_inferior (const char *exec_file,
{
/* FIXME: expected warning? */
/* warning( "Failed to set Kill-on-Last-Close flag: errno = %d(%s)\n",
- errn, strerror(errn) ); */
+ errn, safe_strerror(errn) ); */
}
if (!target_is_pushed (ops))
push_target (ops);