aboutsummaryrefslogtreecommitdiff
path: root/gdb/common/common-gdbthread.h
diff options
context:
space:
mode:
authorSergio Durigan Junior <sergiodj@redhat.com>2016-12-22 13:30:42 -0500
committerSergio Durigan Junior <sergiodj@redhat.com>2017-06-07 19:56:01 -0400
commit043a49349c713dc329a2dfc413b082c3826ecdb8 (patch)
tree3c4c07e3fe64b479579a21ae40bd71723639857c /gdb/common/common-gdbthread.h
parent156525114c1cbbace0dec223494b842ffc60d52e (diff)
downloadgdb-043a49349c713dc329a2dfc413b082c3826ecdb8.zip
gdb-043a49349c713dc329a2dfc413b082c3826ecdb8.tar.gz
gdb-043a49349c713dc329a2dfc413b082c3826ecdb8.tar.bz2
Share parts of gdb/gdbthread.h with gdbserver
GDB and gdbserver now share 'switch_to_thread' because of fork_inferior. To make things clear, I created a new file name common/common-gdbthread.h, and left the implementation specific to each part. gdb/ChangeLog: 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com> * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h". * common/common-gdbthread.h: New file, with parts from "gdb/gdbthread.h". * gdbthread.h: Include "common-gdbthread.h". (switch_to_thread): Moved to "common/common-gdbthread.h". gdb/gdbserver/ChangeLog: 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com> * inferiors.c (switch_to_thread): New function.
Diffstat (limited to 'gdb/common/common-gdbthread.h')
-rw-r--r--gdb/common/common-gdbthread.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/gdb/common/common-gdbthread.h b/gdb/common/common-gdbthread.h
new file mode 100644
index 0000000..d8635e7
--- /dev/null
+++ b/gdb/common/common-gdbthread.h
@@ -0,0 +1,25 @@
+/* Common multi-process/thread control defs for GDB and gdbserver.
+ Copyright (C) 1987-2017 Free Software Foundation, Inc.
+
+ This file is part of GDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef COMMON_GDBTHREAD_H
+#define COMMON_GDBTHREAD_H
+
+/* Switch from one thread to another. */
+extern void switch_to_thread (ptid_t ptid);
+
+#endif /* ! COMMON_GDBTHREAD_H */