From 9044dee230260e0bb9343e27648fd95f2eb7ceb8 Mon Sep 17 00:00:00 2001 From: Joel Brobecker Date: Mon, 7 Jan 2013 11:43:16 +0000 Subject: Add ptrace error handling in lynx_resume gdb/gdbserver/ChangeLog: * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace sets errno. --- gdb/gdbserver/ChangeLog | 5 +++++ gdb/gdbserver/lynx-low.c | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index 49aa286..581a864 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,5 +1,10 @@ 2013-01-07 Joel Brobecker + * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace + sets errno. + +2013-01-07 Joel Brobecker + * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles. 2013-01-07 Joel Brobecker 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. */ -- cgit v1.1