Make linux_stop_lwp be a shared function

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.
This commit is contained in:
Gary Benson 2015-03-24 14:05:44 +00:00
parent 6d4ee8c6ad
commit b2f7c7e8b7
5 changed files with 16 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2015-03-24 Gary Benson <gbenson@redhat.com>
* linux-nat.h (linux_stop_lwp): Move declaration to...
* nat/linux-nat.h (linux_stop_lwp): New declaration.
2015-03-24 Gary Benson <gbenson@redhat.com>
* linux-nat.h: Include nat/linux-nat.h.

View File

@ -1,3 +1,7 @@
2015-03-24 Gary Benson <gbenson@redhat.com>
* linux-low.h (linux_stop_lwp): Remove declaration.
2015-03-24 Gary Benson <gbenson@redhat.com>
* linux-low.h: Include nat/linux-nat.h.

View File

@ -355,7 +355,7 @@ int linux_pid_exe_is_elf_64_file (int pid, unsigned int *machine);
int linux_attach_lwp (ptid_t ptid);
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);

View File

@ -140,7 +140,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. */
/* Stop all LWPs, synchronously. (Any events that trigger while LWPs
are being stopped are left pending.) */

View File

@ -47,4 +47,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 */