Use safe_strerror instead of strerror where possible
authorChristian Biesinger <cbiesinger@google.com>
Fri, 22 Nov 2019 20:31:35 +0000 (14:31 -0600)
committerChristian Biesinger <cbiesinger@google.com>
Tue, 26 Nov 2019 17:53:59 +0000 (11:53 -0600)
commit6d91ce9a659f5b65bb6ad2d30d74250da342150c
tree2dbdd57990ccd640f63ce6f70e2daa0bd8e6b8cd
parent0dfeecca1c5014b79c34bcfec361c4b36b533623
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
gdb/ChangeLog
gdb/gdbserver/ChangeLog
gdb/gdbserver/debug.c
gdb/gdbserver/linux-low.c
gdb/gdbserver/lynx-low.c
gdb/gdbserver/mem-break.c
gdb/gdbserver/nto-low.c
gdb/linux-nat.c
gdb/nto-procfs.c
gdb/windows-nat.c
This page took 0.02538 seconds and 4 git commands to generate.