From: Kieran Bingham <kieran.bingham@linaro.org>
To: gdb-patches@sourceware.org
Cc: arnez@linux.vnet.ibm.com, jeffm@suse.com,
peter.griffin@linaro.org, lee.jones@linaro.org,
yao.qi@linaro.org, russell.wayman@linaro.org, kernel@stlinux.com,
Kieran Bingham <kieran.bingham@linaro.org>
Subject: [PATCH 1/4] gdb/observer: Provide target_thread_changed observer
Date: Thu, 25 Feb 2016 19:15:00 -0000 [thread overview]
Message-ID: <1456427706-30077-2-git-send-email-kieran.bingham@linaro.org> (raw)
In-Reply-To: <1456427706-30077-1-git-send-email-kieran.bingham@linaro.org>
LKD utilises an extra observer to obtain notifications whenever
the target_thread is changed.
This keeps it's internal state aware of any changes that occur
in an event driven manner
---
gdb/doc/observer.texi | 5 +++++
gdb/remote.c | 4 ++++
2 files changed, 9 insertions(+)
diff --git a/gdb/doc/observer.texi b/gdb/doc/observer.texi
index f4049ad3292e..4a9665b374fc 100644
--- a/gdb/doc/observer.texi
+++ b/gdb/doc/observer.texi
@@ -302,3 +302,8 @@ This observer is used for internal testing. Do not use.
See testsuite/gdb.gdb/observer.exp.
@end deftypefun
+@deftypefun void target_thread_changed (ptid_t @var{somearg})
+The target has changed its current thread to ptid_t. Used by LKD and called
+by the shtdi and remote interfaces.
+@end deftypefun
+
diff --git a/gdb/remote.c b/gdb/remote.c
index f09a06e9dcc2..9d3bce690519 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -2162,6 +2162,8 @@ static void
set_general_thread (struct ptid ptid)
{
set_thread (ptid, 1);
+
+ observer_notify_target_thread_changed (ptid);
}
static void
@@ -7071,6 +7073,8 @@ remote_wait (struct target_ops *ops,
mark_async_event_handler (remote_async_inferior_event_token);
}
+ observer_notify_target_thread_changed (event_ptid);
+
return event_ptid;
}
--
2.5.0
next prev parent reply other threads:[~2016-02-25 19:15 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-25 19:15 [RFC PATCH 0/4] GDB Linux Kernel Thread Awareness Kieran Bingham
2016-02-25 19:15 ` Kieran Bingham [this message]
2016-03-01 16:41 ` [PATCH 1/4] gdb/observer: Provide target_thread_changed observer Yao Qi
2016-02-25 19:15 ` [PATCH 2/4] gdb/command: Add LKD Command class Kieran Bingham
2016-02-25 19:15 ` [PATCH 3/4] gdb/lkd: Add Linux Kernel Awareness target Kieran Bingham
2016-02-26 11:02 ` [PATCH] squash! " Kieran Bingham
2016-03-01 17:27 ` [PATCH 3/4] " Yao Qi
2016-03-01 17:37 ` Kieran Bingham
2016-02-25 19:15 ` [PATCH 4/4] lkd: Add an Architecture Layer for ARMv7 targets Kieran Bingham
2016-02-25 20:04 ` [RFC PATCH 0/4] GDB Linux Kernel Thread Awareness Jeff Mahoney
2016-02-29 9:42 ` Kieran Bingham
2016-03-01 16:33 ` Yao Qi
2016-03-02 15:38 ` Kieran Bingham
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=1456427706-30077-2-git-send-email-kieran.bingham@linaro.org \
--to=kieran.bingham@linaro.org \
--cc=arnez@linux.vnet.ibm.com \
--cc=gdb-patches@sourceware.org \
--cc=jeffm@suse.com \
--cc=kernel@stlinux.com \
--cc=lee.jones@linaro.org \
--cc=peter.griffin@linaro.org \
--cc=russell.wayman@linaro.org \
--cc=yao.qi@linaro.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