[PATCH] libdebugger: rtems_debugger_register_tcp_remote()

Sebastian Huber sebastian.huber at embedded-brains.de
Tue Nov 28 13:59:53 UTC 2017


Always provide rtems_debugger_register_tcp_remote().  Header files are
supplied by Newlib and not libnetworking.

Get latest version from libbsd.

Update #3252.
---
 cpukit/Makefile.am                             | 1 +
 cpukit/libdebugger/Makefile.am                 | 6 +-----
 cpukit/libdebugger/preinstall.am               | 2 --
 cpukit/libdebugger/rtems-debugger-remote-tcp.c | 6 +++---
 cpukit/preinstall.am                           | 4 ++++
 5 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/cpukit/Makefile.am b/cpukit/Makefile.am
index f6ee1bfbed..ea4fdb1204 100644
--- a/cpukit/Makefile.am
+++ b/cpukit/Makefile.am
@@ -106,6 +106,7 @@ endif
 
 if LIBDEBUGGER
 include_rtems_HEADERS += libdebugger/rtems-debugger.h
+include_rtems_HEADERS += libdebugger/rtems-debugger-remote-tcp.h
 include_rtems_debuggerdir = $(includedir)/rtems/debugger
 include_rtems_debugger_HEADERS  =
 include_rtems_debugger_HEADERS += libdebugger/rtems-debugger-server.h
diff --git a/cpukit/libdebugger/Makefile.am b/cpukit/libdebugger/Makefile.am
index 72a89447d7..36313312f7 100644
--- a/cpukit/libdebugger/Makefile.am
+++ b/cpukit/libdebugger/Makefile.am
@@ -10,12 +10,8 @@ libdebugger_a_SOURCES = \
   rtems-debugger-server.c \
   rtems-debugger-target.c \
   rtems-debugger-threads.c \
-  rtems-debugger- at RTEMS_CPU@.c
-
-if LIBNETWORKING
-libdebugger_a_SOURCES += \
+  rtems-debugger- at RTEMS_CPU@.c \
   rtems-debugger-remote-tcp.c
-endif
 
 endif
 
diff --git a/cpukit/libdebugger/preinstall.am b/cpukit/libdebugger/preinstall.am
index 695eb30912..dba6cc4d81 100644
--- a/cpukit/libdebugger/preinstall.am
+++ b/cpukit/libdebugger/preinstall.am
@@ -5,5 +5,3 @@ $(srcdir)/preinstall.am: Makefile.am
 	$(AMPOLISH3) $(srcdir)/Makefile.am > $(srcdir)/preinstall.am
 endif
 
-if LIBDEBUGGER
-endif
diff --git a/cpukit/libdebugger/rtems-debugger-remote-tcp.c b/cpukit/libdebugger/rtems-debugger-remote-tcp.c
index b62f3a1f52..696e2deb8c 100644
--- a/cpukit/libdebugger/rtems-debugger-remote-tcp.c
+++ b/cpukit/libdebugger/rtems-debugger-remote-tcp.c
@@ -1,6 +1,5 @@
 /*
- * Copyright (c) 2016 Chris Johns <chrisj at rtems.org>.
- * All rights reserved.
+ * Copyright (c) 2016 Chris Johns <chrisj at rtems.org>.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -38,7 +37,7 @@
 #include <rtems/debugger/rtems-debugger-server.h>
 #include <rtems/debugger/rtems-debugger-remote.h>
 
-#include "rtems-debugger-remote-tcp.h"
+#include <rtems/rtems-debugger-remote-tcp.h>
 
 /**
  * Debugger default server port. 'RT' as ASCII.
@@ -277,6 +276,7 @@ tcp_remote_disconnect(rtems_debugger_remote* remote)
 
   tcp = (rtems_debugger_remote_tcp*) remote->data;
   close(tcp->fd);
+  tcp->fd = -1;
 
   rtems_debugger_unlock();
 
diff --git a/cpukit/preinstall.am b/cpukit/preinstall.am
index b687fb3ae5..a2e725a178 100644
--- a/cpukit/preinstall.am
+++ b/cpukit/preinstall.am
@@ -242,6 +242,10 @@ $(PROJECT_INCLUDE)/rtems/rtems-debugger.h: libdebugger/rtems-debugger.h $(PROJEC
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems-debugger.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems-debugger.h
 
+$(PROJECT_INCLUDE)/rtems/rtems-debugger-remote-tcp.h: libdebugger/rtems-debugger-remote-tcp.h $(PROJECT_INCLUDE)/rtems/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems-debugger-remote-tcp.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems-debugger-remote-tcp.h
+
 $(PROJECT_INCLUDE)/rtems/debugger/$(dirstamp):
 	@$(MKDIR_P) $(PROJECT_INCLUDE)/rtems/debugger
 	@: > $(PROJECT_INCLUDE)/rtems/debugger/$(dirstamp)
-- 
2.12.3



More information about the devel mailing list