forked from Imagelibrary/rtems
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.
This commit is contained in:
@@ -161,6 +161,7 @@ include_rtems_HEADERS += include/rtems/rbheap.h
|
|||||||
include_rtems_HEADERS += include/rtems/rbtree.h
|
include_rtems_HEADERS += include/rtems/rbtree.h
|
||||||
include_rtems_HEADERS += include/rtems/ringbuf.h
|
include_rtems_HEADERS += include/rtems/ringbuf.h
|
||||||
include_rtems_HEADERS += include/rtems/rtc.h
|
include_rtems_HEADERS += include/rtems/rtc.h
|
||||||
|
include_rtems_HEADERS += include/rtems/rtems-debugger-remote-tcp.h
|
||||||
include_rtems_HEADERS += include/rtems/rtems-debugger.h
|
include_rtems_HEADERS += include/rtems/rtems-debugger.h
|
||||||
include_rtems_HEADERS += include/rtems/rtems-fdt-shell.h
|
include_rtems_HEADERS += include/rtems/rtems-fdt-shell.h
|
||||||
include_rtems_HEADERS += include/rtems/rtems-fdt.h
|
include_rtems_HEADERS += include/rtems/rtems-fdt.h
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2016 Chris Johns <chrisj@rtems.org>.
|
* Copyright (c) 2016 Chris Johns <chrisj@rtems.org>. All rights reserved.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@@ -2,20 +2,20 @@ include $(top_srcdir)/automake/compile.am
|
|||||||
|
|
||||||
if LIBDEBUGGER
|
if LIBDEBUGGER
|
||||||
|
|
||||||
noinst_LIBRARIES = libdebugger.a
|
project_lib_LIBRARIES = libdebugger.a
|
||||||
libdebugger_a_SOURCES = \
|
libdebugger_a_SOURCES = \
|
||||||
rtems-debugger-block.c \
|
rtems-debugger-block.c \
|
||||||
rtems-debugger-cmd.c \
|
rtems-debugger-cmd.c \
|
||||||
rtems-debugger-remote.c \
|
rtems-debugger-remote.c \
|
||||||
rtems-debugger-server.c \
|
rtems-debugger-server.c \
|
||||||
rtems-debugger-target.c \
|
rtems-debugger-target.c \
|
||||||
|
rtems-debugger-remote-tcp.c \
|
||||||
rtems-debugger-threads.c \
|
rtems-debugger-threads.c \
|
||||||
rtems-debugger-@RTEMS_CPU@.c
|
rtems-debugger-@RTEMS_CPU@.c
|
||||||
|
|
||||||
if LIBNETWORKING
|
$(PROJECT_LIB)/libdebugger.a: libdebugger.a
|
||||||
libdebugger_a_SOURCES += \
|
$(INSTALL_DATA) $< $(PROJECT_LIB)/libdebugger.a
|
||||||
rtems-debugger-remote-tcp.c
|
TMPINSTALL_FILES = $(PROJECT_LIB)/libdebugger.a
|
||||||
endif
|
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2016 Chris Johns <chrisj@rtems.org>.
|
* Copyright (c) 2016 Chris Johns <chrisj@rtems.org>. All rights reserved.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@@ -38,7 +37,7 @@
|
|||||||
#include <rtems/debugger/rtems-debugger-server.h>
|
#include <rtems/debugger/rtems-debugger-server.h>
|
||||||
#include <rtems/debugger/rtems-debugger-remote.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.
|
* 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;
|
tcp = (rtems_debugger_remote_tcp*) remote->data;
|
||||||
close(tcp->fd);
|
close(tcp->fd);
|
||||||
|
tcp->fd = -1;
|
||||||
|
|
||||||
rtems_debugger_unlock();
|
rtems_debugger_unlock();
|
||||||
|
|
||||||
|
|||||||
@@ -98,10 +98,6 @@ if LIBDL
|
|||||||
TMP_LIBS += ../libdl/libdl.a
|
TMP_LIBS += ../libdl/libdl.a
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if LIBDEBUGGER
|
|
||||||
TMP_LIBS += ../libdebugger/libdebugger.a
|
|
||||||
endif
|
|
||||||
|
|
||||||
librtemscpu.a: $(TMP_LIBS)
|
librtemscpu.a: $(TMP_LIBS)
|
||||||
$(AM_V_GEN)rm -f $@
|
$(AM_V_GEN)rm -f $@
|
||||||
$(AM_V_GEN)$(MKDIR_P) $(ARCH)
|
$(AM_V_GEN)$(MKDIR_P) $(ARCH)
|
||||||
|
|||||||
@@ -246,6 +246,7 @@ debugger01_SOURCES = debugger01/init.c debugger01/remote.c \
|
|||||||
debugger01/system.h
|
debugger01/system.h
|
||||||
debugger01_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_debugger01) \
|
debugger01_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_debugger01) \
|
||||||
$(support_includes)
|
$(support_includes)
|
||||||
|
debugger01_LDADD = -ldebugger
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user