public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "qiyao at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug server/18130] gdbserver event loop is terminated by exception
Date: Mon, 16 Mar 2015 09:32:00 -0000	[thread overview]
Message-ID: <bug-18130-4717-dqquUCArU9@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-18130-4717@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=18130

--- Comment #1 from Yao Qi <qiyao at gcc dot gnu.org> ---
The exception can be either caught in the caller of
the_low_target.prepare_to_resume (lwp) or not thrown out from prepare_to_resume
hook in each backend.

I had a hacky patch for the former approach, and the event loop isn't
terminated by the exception.

diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
index 48d905b..65b7110 100644
--- a/gdb/gdbserver/linux-low.c
+++ b/gdb/gdbserver/linux-low.c
@@ -3560,8 +3560,16 @@ linux_resume_one_lwp (struct lwp_info *lwp,
       *p_sig = NULL;
     }

+  TRY
+    {
   if (the_low_target.prepare_to_resume != NULL)
     the_low_target.prepare_to_resume (lwp);
+    }
+  CATCH (exception, RETURN_MASK_ERROR)
+    {
+      /**/
+    }
+  END_CATCH

   regcache_invalidate_thread (thread);
   errno = 0;
-------------------------------------------

However, I still not sure what is the best way to fix this issue.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


      reply	other threads:[~2015-03-16  9:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-16  9:17 [Bug server/18130] New: " qiyao at gcc dot gnu.org
2015-03-16  9:32 ` qiyao at gcc dot gnu.org [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-18130-4717-dqquUCArU9@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).