This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 11/11 v5] Remove one GDBSERVER use from linux-waitpid.c


This commit makes nat/linux-waitpid.c include common-defs.h rather
than defs.h or server.h.  A use of GDBSERVER had to be left in to
support some some thread_db debug code.  This hack will be removed
when the Linux thread_db code is unified and made shared.

gdb/
2014-08-01  Gary Benson  <gbenson@redhat.com>

	* nat/linux-waitpid.c: Include common-defs.h.
	Don't include defs.h or server.h.
	(linux_debug) [GDBSERVER]: Declare debug_threads.
---
 gdb/ChangeLog           |    6 ++++++
 gdb/nat/linux-waitpid.c |   10 +++-------
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/gdb/nat/linux-waitpid.c b/gdb/nat/linux-waitpid.c
index 53847ac..d04a3af 100644
--- a/gdb/nat/linux-waitpid.c
+++ b/gdb/nat/linux-waitpid.c
@@ -17,13 +17,7 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#ifdef GDBSERVER
-#include "server.h"
-#else
-#include "defs.h"
-#include "signal.h"
-#endif
-
+#include "common-defs.h"
 #include "linux-nat.h"
 #include "linux-waitpid.h"
 #include "gdb_wait.h"
@@ -35,6 +29,8 @@ static inline void
 linux_debug (const char *format, ...)
 {
 #ifdef GDBSERVER
+  extern int debug_threads;
+
   if (debug_threads)
     {
       va_list args;
-- 
1.7.1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]