From: Pedro Alves <palves@redhat.com>
To: Ulrich Weigand <uweigand@de.ibm.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] gdbserver: don't pick a random thread if the current thread dies
Date: Mon, 24 Aug 2015 17:02:00 -0000 [thread overview]
Message-ID: <55DB4E28.3000001@redhat.com> (raw)
In-Reply-To: <55DB3894.7000105@redhat.com>
On 08/24/2015 04:30 PM, Pedro Alves wrote:
> I guess lwpid_of would be a little better even.
I went ahead a pushed this bit in, like below. Build-tested on
the gcc110 ppc64 machine on the GCC compile farm.
The fix for the crash will follow.
From a8c6d4fcd6b2a30c2b5b87d656ce035dcf8b0035 Mon Sep 17 00:00:00 2001
From: Pedro Alves <palves@redhat.com>
Date: Mon, 24 Aug 2015 17:58:22 +0100
Subject: [PATCH] Fix gdbserver SPU build
Ref: https://sourceware.org/ml/gdb-patches/2015-08/msg00675.html
gdbserver/spu-low.c: In function 'spu_request_interrupt':
gdbserver/spu-low.c:639: error: incompatible type for argument 1 of 'ptid_get_lwp'
gdb/gdbserver/ChangeLog:
2015-08-24 Pedro Alves <palves@redhat.com>
* spu-low.c (spu_request_interrupt): Use lwpid_of instead of
ptid_get_lwp.
---
gdb/gdbserver/ChangeLog | 5 +++++
gdb/gdbserver/spu-low.c | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index cd5e046..12d8bb3 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,8 @@
+2015-08-24 Pedro Alves <palves@redhat.com>
+
+ * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
+ ptid_get_lwp.
+
2015-08-21 Pedro Alves <palves@redhat.com>
* ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
diff --git a/gdb/gdbserver/spu-low.c b/gdb/gdbserver/spu-low.c
index 2ca9159..a110a0e 100644
--- a/gdb/gdbserver/spu-low.c
+++ b/gdb/gdbserver/spu-low.c
@@ -636,7 +636,7 @@ spu_request_interrupt (void)
{
struct thread_info *thr = get_first_thread ();
- syscall (SYS_tkill, ptid_get_lwp (thr), SIGINT);
+ syscall (SYS_tkill, lwpid_of (thr), SIGINT);
}
static struct target_ops spu_target_ops = {
--
1.9.3
next prev parent reply other threads:[~2015-08-24 17:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-06 14:54 Pedro Alves
2015-08-21 18:44 ` Pedro Alves
2015-08-24 14:59 ` Ulrich Weigand
2015-08-24 15:30 ` Pedro Alves
2015-08-24 15:47 ` Pedro Alves
2015-08-24 17:02 ` Pedro Alves [this message]
2015-08-24 17:08 ` Ulrich Weigand
2015-08-24 17:13 ` Pedro Alves
2015-08-24 18:39 ` Ulrich Weigand
2015-08-24 19:09 ` Pedro Alves
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=55DB4E28.3000001@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=uweigand@de.ibm.com \
/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