diff options
author | Christian Biesinger <cbiesinger@google.com> | 2019-11-22 14:31:35 -0600 |
---|---|---|
committer | Christian Biesinger <cbiesinger@google.com> | 2019-11-26 11:53:59 -0600 |
commit | 6d91ce9a659f5b65bb6ad2d30d74250da342150c (patch) | |
tree | 2dbdd57990ccd640f63ce6f70e2daa0bd8e6b8cd /gdb/linux-nat.c | |
parent | 0dfeecca1c5014b79c34bcfec361c4b36b533623 (diff) | |
download | gdb-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/linux-nat.c')
-rw-r--r-- | gdb/linux-nat.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c index bc39796..2a63ac7 100644 --- a/gdb/linux-nat.c +++ b/gdb/linux-nat.c @@ -1420,7 +1420,7 @@ detach_one_lwp (struct lwp_info *lp, int *signo_p) if (ret == -1) { warning (_("Couldn't reap LWP %d while detaching: %s"), - lwpid, strerror (errno)); + lwpid, safe_strerror (errno)); } else if (!WIFEXITED (status) && !WIFSIGNALED (status)) { |