From: Gary Benson <gbenson@redhat.com>
To: gdb-patches@sourceware.org
Subject: [PATCH 04/13 v2] Make linux_stop_lwp be a shared function
Date: Thu, 09 Oct 2014 09:53:00 -0000 [thread overview]
Message-ID: <1412848358-9958-5-git-send-email-gbenson@redhat.com> (raw)
In-Reply-To: <1412848358-9958-1-git-send-email-gbenson@redhat.com>
Both GDB and gdbserver had linux_stop_lwp functions with identical
declarations. This commit moves these to nat/linux-nat.h to allow
shared code to use the function.
gdb/ChangeLog:
* linux-nat.h (linux_stop_lwp): Move declaration to...
* nat/linux-nat.h (linux_stop_lwp): New declaration.
gdb/gdbserver/ChangeLog:
* linux-low.h (linux_stop_lwp): Remove declaration.
---
gdb/ChangeLog | 5 +++++
gdb/gdbserver/ChangeLog | 4 ++++
gdb/gdbserver/linux-low.h | 2 +-
gdb/linux-nat.h | 2 +-
gdb/nat/linux-nat.h | 5 +++++
5 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/gdb/gdbserver/linux-low.h b/gdb/gdbserver/linux-low.h
index 11d73f3..697e0fb 100644
--- a/gdb/gdbserver/linux-low.h
+++ b/gdb/gdbserver/linux-low.h
@@ -359,7 +359,7 @@ int linux_attach_lwp (ptid_t ptid);
char *linux_attach_fail_reason_string (ptid_t ptid, int err);
struct lwp_info *find_lwp_pid (ptid_t ptid);
-void linux_stop_lwp (struct lwp_info *lwp);
+/* For linux_stop_lwp see nat/linux-nat.h. */
#ifdef HAVE_LINUX_REGSETS
void initialize_regsets_info (struct regsets_info *regsets_info);
diff --git a/gdb/linux-nat.h b/gdb/linux-nat.h
index 0195c5a..e1edbf8 100644
--- a/gdb/linux-nat.h
+++ b/gdb/linux-nat.h
@@ -124,7 +124,7 @@ void linux_proc_pending_signals (int pid, sigset_t *pending,
extern int lin_lwp_attach_lwp (ptid_t ptid);
-extern void linux_stop_lwp (struct lwp_info *lwp);
+/* For linux_stop_lwp see nat/linux-nat.h. */
/* Create a prototype generic GNU/Linux target. The client can
override it with local methods. */
diff --git a/gdb/nat/linux-nat.h b/gdb/nat/linux-nat.h
index a2a0a98..da94f2f 100644
--- a/gdb/nat/linux-nat.h
+++ b/gdb/nat/linux-nat.h
@@ -45,4 +45,9 @@ extern struct lwp_info *iterate_over_lwps (ptid_t filter,
iterate_over_lwps_ftype callback,
void *data);
+/* Cause LWP to stop. This function must be provided by the
+ client. */
+
+extern void linux_stop_lwp (struct lwp_info *lwp);
+
#endif /* LINUX_NAT_H */
--
1.7.1
next prev parent reply other threads:[~2014-10-09 9:53 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-09 9:53 [PATCH 00/13 v2] Refactor low-level Linux x86 debug register code Gary Benson
2014-10-09 9:53 ` [PATCH 01/13 v2] Introduce current_lwp_ptid Gary Benson
2014-10-28 12:56 ` Pedro Alves
2014-10-28 16:44 ` Doug Evans
2014-10-28 17:12 ` Doug Evans
2014-10-28 17:13 ` Doug Evans
2014-10-28 18:35 ` Pedro Alves
2014-10-28 19:43 ` Doug Evans
2014-10-31 18:57 ` Doug Evans
2014-10-09 9:53 ` Gary Benson [this message]
2014-10-28 12:56 ` [PATCH 04/13 v2] Make linux_stop_lwp be a shared function Pedro Alves
2014-10-09 9:53 ` [PATCH 02/13 v2] Add x86_debug_reg_state to gdbserver Gary Benson
2014-10-28 12:56 ` Pedro Alves
2014-10-09 9:54 ` [PATCH 12/13 v2] Move low-level Linux x86 debug register code to a shared file Gary Benson
2014-10-28 13:01 ` Pedro Alves
2014-10-09 10:18 ` [PATCH 03/13 v2] Add iterate_over_lwps to gdbserver Gary Benson
2014-10-28 12:56 ` Pedro Alves
2014-10-09 10:18 ` [PATCH 07/13 v2] Make lwp_info.arch_private handling shared Gary Benson
2014-10-28 12:57 ` Pedro Alves
2014-10-09 10:18 ` [PATCH 05/13 v2] Introduce basic LWP accessors Gary Benson
2014-10-28 12:57 ` Pedro Alves
2014-10-09 10:21 ` [PATCH 08/13 v2] Rename gdbserver's low-level Linux x86 debug register accessors Gary Benson
2014-10-28 12:58 ` Pedro Alves
2014-10-09 10:21 ` [PATCH 10/13 v2] Linux x86 low-level debug register comment synchronization Gary Benson
2014-10-28 12:59 ` Pedro Alves
2014-10-09 10:35 ` [PATCH 06/13 v2] Change signature of linux_target_ops.new_thread Gary Benson
2014-10-28 12:57 ` Pedro Alves
2014-10-09 10:35 ` [PATCH 11/13 v2] Introduce x86_linux_update_debug_registers Gary Benson
2014-10-28 13:00 ` Pedro Alves
2014-10-09 10:44 ` [PATCH 09/13 v2] Linux x86 low-level debug register code synchronization Gary Benson
2014-10-28 12:59 ` Pedro Alves
2014-10-09 10:44 ` [PATCH 13/13 v2] Move duplicated Linux x86 code to nat/x86-linux.c Gary Benson
2014-10-28 13:01 ` Pedro Alves
2015-03-24 14:11 ` [pushed] Refactor low-level Linux x86 debug register code Gary Benson
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=1412848358-9958-5-git-send-email-gbenson@redhat.com \
--to=gbenson@redhat.com \
--cc=gdb-patches@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