diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2018-04-30 09:09:27 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2018-05-02 09:56:43 +0200 |
commit | dd8e4b760b6b86a49be79f04a29fa7be20e11b92 (patch) | |
tree | c3ac9c5be1aad34de0a86b42c9747bce844150d8 /cpukit/libdebugger | |
parent | tests: Move rtems-test-check.py (diff) | |
download | rtems-dd8e4b760b6b86a49be79f04a29fa7be20e11b92.tar.bz2 |
libdebugger: Move to separate library
Always build remote TCP support since it depends only on the POSIX
socket API. It works with the legacy network stack and libbsd. Move it
to a separate libdebugger.a library to allow an easy use with libbsd via
"-ldebugger -lbsd" otherwise we would have a cyclic dependency between
libbsd.a and librtemscpu.a.
Update #3419.
Diffstat (limited to 'cpukit/libdebugger')
-rw-r--r-- | cpukit/libdebugger/Makefile.am | 10 | ||||
-rw-r--r-- | cpukit/libdebugger/rtems-debugger-remote-tcp.c | 6 | ||||
-rw-r--r-- | cpukit/libdebugger/rtems-debugger-remote-tcp.h | 48 |
3 files changed, 8 insertions, 56 deletions
diff --git a/cpukit/libdebugger/Makefile.am b/cpukit/libdebugger/Makefile.am index b202003e41..6ff35d197f 100644 --- a/cpukit/libdebugger/Makefile.am +++ b/cpukit/libdebugger/Makefile.am @@ -2,20 +2,20 @@ include $(top_srcdir)/automake/compile.am if LIBDEBUGGER -noinst_LIBRARIES = libdebugger.a +project_lib_LIBRARIES = libdebugger.a libdebugger_a_SOURCES = \ rtems-debugger-block.c \ rtems-debugger-cmd.c \ rtems-debugger-remote.c \ rtems-debugger-server.c \ rtems-debugger-target.c \ + rtems-debugger-remote-tcp.c \ rtems-debugger-threads.c \ rtems-debugger-@RTEMS_CPU@.c -if LIBNETWORKING -libdebugger_a_SOURCES += \ - rtems-debugger-remote-tcp.c -endif +$(PROJECT_LIB)/libdebugger.a: libdebugger.a + $(INSTALL_DATA) $< $(PROJECT_LIB)/libdebugger.a +TMPINSTALL_FILES = $(PROJECT_LIB)/libdebugger.a 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@rtems.org>. - * All rights reserved. + * Copyright (c) 2016 Chris Johns <chrisj@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/libdebugger/rtems-debugger-remote-tcp.h b/cpukit/libdebugger/rtems-debugger-remote-tcp.h deleted file mode 100644 index 3d9dab9f45..0000000000 --- a/cpukit/libdebugger/rtems-debugger-remote-tcp.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2016 Chris Johns <chrisj@rtems.org>. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -/* - * Debugger for RTEMS. - */ - -#ifndef _RTEMS_DEBUGGER_REMOTE_TCP_h -#define _RTEMS_DEBUGGER_REMOTE_TCP_h - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/** - * Register a remote with the server. - */ -int rtems_debugger_register_tcp_remote(void); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -#endif |