aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver/lynx-low.c
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2013-01-07 11:43:16 +0000
committerJoel Brobecker <brobecker@gnat.com>2013-01-07 11:43:16 +0000
commit9044dee230260e0bb9343e27648fd95f2eb7ceb8 (patch)
tree0b66499507c5d7501e91c1348a9662b9c2f98189 /gdb/gdbserver/lynx-low.c
parente6352c8f639e960607aab87c831738a61d3bd8c6 (diff)
downloadgdb-9044dee230260e0bb9343e27648fd95f2eb7ceb8.zip
gdb-9044dee230260e0bb9343e27648fd95f2eb7ceb8.tar.gz
gdb-9044dee230260e0bb9343e27648fd95f2eb7ceb8.tar.bz2
Add ptrace error handling in lynx_resume
gdb/gdbserver/ChangeLog: * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace sets errno.
Diffstat (limited to 'gdb/gdbserver/lynx-low.c')
-rw-r--r--gdb/gdbserver/lynx-low.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/gdbserver/lynx-low.c b/gdb/gdbserver/lynx-low.c
index 4aba379..ccee8c8 100644
--- a/gdb/gdbserver/lynx-low.c
+++ b/gdb/gdbserver/lynx-low.c
@@ -359,7 +359,11 @@ lynx_resume (struct thread_resume *resume_info, size_t n)
ptid = thread_to_gdb_id (current_inferior);
regcache_invalidate ();
+
+ errno = 0;
lynx_ptrace (request, ptid, 1, signal, 0);
+ if (errno)
+ perror_with_name ("ptrace");
}
/* Resume the execution of the given PTID. */