[04/13,v2] Make linux_stop_lwp be a shared function
Commit Message
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(-)
Comments
On 10/09/2014 10:52 AM, Gary Benson wrote:
> 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.
OK.
Thanks,
Pedro Alves
@@ -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);
@@ -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. */
@@ -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 */