aboutsummaryrefslogtreecommitdiff
path: root/gdb/nat
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@adacore.com>2015-01-20 18:38:23 +0100
committerJoel Brobecker <brobecker@adacore.com>2015-01-20 19:08:17 +0100
commit049bb5dee8598d2910ff47c1eda3df3cb2ec6493 (patch)
tree1ae1bbfacbe3941c757212b511ff135a9da31f25 /gdb/nat
parent42b87c63bc5fc1daac598c07ca65b71591a65f27 (diff)
downloadgdb-049bb5dee8598d2910ff47c1eda3df3cb2ec6493.zip
gdb-049bb5dee8598d2910ff47c1eda3df3cb2ec6493.tar.gz
gdb-049bb5dee8598d2910ff47c1eda3df3cb2ec6493.tar.bz2
gdb/ARI: Call safe_strerror instead of strerror in linux-ptrace.c
gdb/ChangeLog: * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason_string) (linux_ptrace_test_ret_to_nx): Use safe_strerror instead of strerror.
Diffstat (limited to 'gdb/nat')
-rw-r--r--gdb/nat/linux-ptrace.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/gdb/nat/linux-ptrace.c b/gdb/nat/linux-ptrace.c
index 3981592..0ce258f 100644
--- a/gdb/nat/linux-ptrace.c
+++ b/gdb/nat/linux-ptrace.c
@@ -73,10 +73,10 @@ linux_ptrace_attach_fail_reason_string (ptid_t ptid, int err)
warnings = buffer_finish (&buffer);
if (warnings[0] != '\0')
reason_string = xstrprintf ("%s (%d), %s",
- strerror (err), err, warnings);
+ safe_strerror (err), err, warnings);
else
reason_string = xstrprintf ("%s (%d)",
- strerror (err), err);
+ safe_strerror (err), err);
xfree (warnings);
return reason_string;
}
@@ -111,7 +111,7 @@ linux_ptrace_test_ret_to_nx (void)
if (return_address == MAP_FAILED)
{
warning (_("linux_ptrace_test_ret_to_nx: Cannot mmap: %s"),
- strerror (errno));
+ safe_strerror (errno));
return;
}
@@ -123,7 +123,7 @@ linux_ptrace_test_ret_to_nx (void)
{
case -1:
warning (_("linux_ptrace_test_ret_to_nx: Cannot fork: %s"),
- strerror (errno));
+ safe_strerror (errno));
return;
case 0:
@@ -131,7 +131,7 @@ linux_ptrace_test_ret_to_nx (void)
(PTRACE_TYPE_ARG4) NULL);
if (l != 0)
warning (_("linux_ptrace_test_ret_to_nx: Cannot PTRACE_TRACEME: %s"),
- strerror (errno));
+ safe_strerror (errno));
else
{
#if defined __i386__
@@ -161,7 +161,7 @@ linux_ptrace_test_ret_to_nx (void)
if (got_pid != child)
{
warning (_("linux_ptrace_test_ret_to_nx: waitpid returned %ld: %s"),
- (long) got_pid, strerror (errno));
+ (long) got_pid, safe_strerror (errno));
return;
}
@@ -205,7 +205,7 @@ linux_ptrace_test_ret_to_nx (void)
if (errno != 0)
{
warning (_("linux_ptrace_test_ret_to_nx: Cannot PTRACE_PEEKUSER: %s"),
- strerror (errno));
+ safe_strerror (errno));
return;
}
pc = (void *) (uintptr_t) l;
@@ -220,7 +220,7 @@ linux_ptrace_test_ret_to_nx (void)
{
warning (_("linux_ptrace_test_ret_to_nx: "
"PTRACE_KILL waitpid returned %ld: %s"),
- (long) got_pid, strerror (errno));
+ (long) got_pid, safe_strerror (errno));
return;
}
if (!WIFSIGNALED (kill_status))