Remove <rtems/debug.h>

Close #2477.
This commit is contained in:
Sebastian Huber
2015-11-26 14:08:56 +01:00
parent a06201439a
commit 8054b1c718
19 changed files with 3 additions and 304 deletions

View File

@@ -18,8 +18,6 @@
* + allocate memory to C Program Heap * + allocate memory to C Program Heap
* + initialize C Library and C Program Heap * + initialize C Library and C Program Heap
* + bsp_pretasking_hook * + bsp_pretasking_hook
* + if defined( RTEMS_DEBUG )
* - rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
* + rtems_initialize_before_drivers * + rtems_initialize_before_drivers
* + bsp_predriver_hook * + bsp_predriver_hook
* + rtems_initialize_device_drivers * + rtems_initialize_device_drivers
@@ -107,17 +105,6 @@ void boot_card(
*/ */
bsp_pretasking_hook(); bsp_pretasking_hook();
/*
* If debug is enabled, then enable all dynamic RTEMS debug
* capabilities.
*
* NOTE: Most debug features are conditionally compiled in
* or enabled via configure time plugins.
*/
#ifdef RTEMS_DEBUG
rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
#endif
/* /*
* Let RTEMS perform initialization it requires before drivers * Let RTEMS perform initialization it requires before drivers
* are allowed to be initialized. * are allowed to be initialized.

View File

@@ -84,8 +84,6 @@ void bsp_reset(void);
* - rtems_initialize_data_structures() * - rtems_initialize_data_structures()
* - initialize C Library * - initialize C Library
* - bsp_pretasking_hook() * - bsp_pretasking_hook()
* - if defined( RTEMS_DEBUG )
* - rtems_debug_enable( RTEMS_DEBUG_ALL_MASK )
* - rtems_initialize_before_drivers() * - rtems_initialize_before_drivers()
* - bsp_predriver_hook() * - bsp_predriver_hook()
* - rtems_initialize_device_drivers() * - rtems_initialize_device_drivers()

View File

@@ -31,7 +31,6 @@
#include <rtems/rtems/types.h> #include <rtems/rtems/types.h>
#include <rtems/config.h> #include <rtems/config.h>
#include <rtems/debug.h>
#include <rtems/init.h> #include <rtems/init.h>
#include <rtems/rtems/options.h> #include <rtems/rtems/options.h>
#include <rtems/rtems/tasks.h> #include <rtems/rtems/tasks.h>

View File

@@ -21,7 +21,6 @@
#include <rtems/score/heapimpl.h> #include <rtems/score/heapimpl.h>
#include <rtems/score/objectimpl.h> #include <rtems/score/objectimpl.h>
#include <rtems/score/threadqimpl.h> #include <rtems/score/threadqimpl.h>
#include <rtems/debug.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

View File

@@ -26,7 +26,7 @@ include_rtems_HEADERS += include/rtems/timespec.h
EXTRA_DIST = include/rtems/README EXTRA_DIST = include/rtems/README
noinst_LIBRARIES = libsapi.a noinst_LIBRARIES = libsapi.a
libsapi_a_SOURCES = src/debug.c src/extension.c src/extensioncreate.c \ libsapi_a_SOURCES = src/extension.c src/extensioncreate.c \
src/extensiondelete.c src/extensionident.c src/fatal.c src/exinit.c \ src/extensiondelete.c src/extensionident.c src/fatal.c src/exinit.c \
src/exshutdown.c src/io.c src/ioclose.c src/iocontrol.c src/iodata.c \ src/exshutdown.c src/io.c src/ioclose.c src/iocontrol.c src/iodata.c \
src/ioinitialize.c src/ioopen.c src/ioread.c src/ioregisterdriver.c \ src/ioinitialize.c src/ioopen.c src/ioread.c src/ioregisterdriver.c \

View File

@@ -24,8 +24,6 @@ extern "C" {
#endif #endif
#include <rtems/config.h> #include <rtems/config.h>
#include <rtems/debug.h>
#include <rtems/fatal.h> #include <rtems/fatal.h>
#include <rtems/init.h> #include <rtems/init.h>
#include <rtems/io.h> #include <rtems/io.h>

View File

@@ -1,51 +0,0 @@
/**
* @file
*
* @brief Debug Manager
*
* @ingroup ClassicDebug
*/
/*
* Debug Manager
*
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.org/license/LICENSE.
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/system.h>
#include <rtems/debug.h>
void _Debug_Manager_initialization( void )
{
rtems_debug_disable( RTEMS_DEBUG_ALL_MASK );
}
void rtems_debug_enable (
rtems_debug_control to_be_enabled
)
{
_Debug_Level |= to_be_enabled;
}
void rtems_debug_disable (
rtems_debug_control to_be_disabled
)
{
_Debug_Level &= ~to_be_disabled;
}
bool rtems_debug_is_enabled(
rtems_debug_control level
)
{
return (_Debug_Level & level) ? true : false;
}

View File

@@ -29,7 +29,6 @@
#include <rtems/system.h> #include <rtems/system.h>
#include <rtems/config.h> #include <rtems/config.h>
#include <rtems/debug.h>
#include <rtems/extensionimpl.h> #include <rtems/extensionimpl.h>
#include <rtems/init.h> #include <rtems/init.h>
#include <rtems/score/sysstate.h> #include <rtems/score/sysstate.h>
@@ -102,12 +101,6 @@ void rtems_initialize_data_structures(void)
_Objects_MP_Handler_early_initialization(); _Objects_MP_Handler_early_initialization();
#endif #endif
/*
* Do this as early as possible to ensure no debugging output
* is even attempted to be printed.
*/
_Debug_Manager_initialization();
_API_extensions_Initialization(); _API_extensions_Initialization();
_Thread_Dispatch_initialization(); _Thread_Dispatch_initialization();

View File

@@ -16,7 +16,7 @@ include_sys_HEADERS += include/sys/timex.h
include_rtemsdir = $(includedir)/rtems include_rtemsdir = $(includedir)/rtems
include_rtems_HEADERS = include/rtems/debug.h include_rtems_HEADERS =
include_rtems_HEADERS += include/rtems/system.h include_rtems_HEADERS += include/rtems/system.h
include_rtems_HEADERS += include/rtems/seterr.h include_rtems_HEADERS += include/rtems/seterr.h

View File

@@ -1,91 +0,0 @@
/**
* @file rtems/debug.h
*
* @brief Information Related to the Debug Support Within RTEMS
*
* This include file contains the information pertaining to the debug
* support within RTEMS. It is currently cast in the form of a
* Manager since it is externally accessible.
*/
/*
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.org/license/LICENSE.
*/
#ifndef _RTEMS_DEBUG_H
#define _RTEMS_DEBUG_H
#include <rtems/score/basedefs.h>
/**
* @defgroup ScoreDebug Debug Information
*
* @ingroup Score
*/
/**@{*/
#ifdef __cplusplus
extern "C" {
#endif
/**
* The following type is used to manage the debug mask.
*/
typedef uint32_t rtems_debug_control;
/*
* These constants represent various classes of debugging.
*/
/** Macro which indicates that all debugging modes are enabled */
#define RTEMS_DEBUG_ALL_MASK 0xffffffff
/** Macro which indicates that debugging for heaps/regions is enabled */
#define RTEMS_DEBUG_REGION 0x00000001
/**
* This variable contains the current debug level.
*/
SCORE_EXTERN rtems_debug_control _Debug_Level;
/**
* @brief Initialize debug manager.
*/
void _Debug_Manager_initialization( void );
/**
* @brief Enable debugging.
*/
void rtems_debug_enable(
rtems_debug_control to_be_enabled
);
/**
* @brief Disable debugging.
*/
void rtems_debug_disable(
rtems_debug_control to_be_disabled
);
/**
* @brief Check if debug is enabled.
*
* This routine returns TRUE if the requested debug level is
* enabled, and FALSE otherwise.
*/
bool rtems_debug_is_enabled(
rtems_debug_control level
);
#ifdef __cplusplus
}
#endif
/**@}*/
#endif
/* end of include file */

View File

@@ -43,10 +43,6 @@ $(PROJECT_INCLUDE)/rtems/$(dirstamp):
@: > $(PROJECT_INCLUDE)/rtems/$(dirstamp) @: > $(PROJECT_INCLUDE)/rtems/$(dirstamp)
PREINSTALL_DIRS += $(PROJECT_INCLUDE)/rtems/$(dirstamp) PREINSTALL_DIRS += $(PROJECT_INCLUDE)/rtems/$(dirstamp)
$(PROJECT_INCLUDE)/rtems/debug.h: include/rtems/debug.h $(PROJECT_INCLUDE)/rtems/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/debug.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/debug.h
$(PROJECT_INCLUDE)/rtems/system.h: include/rtems/system.h $(PROJECT_INCLUDE)/rtems/$(dirstamp) $(PROJECT_INCLUDE)/rtems/system.h: include/rtems/system.h $(PROJECT_INCLUDE)/rtems/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/system.h $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/system.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/system.h PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/system.h

View File

@@ -4,7 +4,7 @@ ACLOCAL_AMFLAGS = -I ../aclocal
## deleted over the years. ## deleted over the years.
_SUBDIRS = \ _SUBDIRS = \
sp01 sp02 sp03 sp04 sp05 sp06 sp07 sp08 \ sp01 sp02 sp03 sp04 sp05 sp06 sp07 sp08 \
sp10 sp11 sp12 sp13 sp14 sp15 sp16 sp17 sp18 sp19 \ sp11 sp12 sp13 sp14 sp15 sp16 sp17 sp18 sp19 \
sp20 sp21 sp22 sp23 sp24 sp25 sp26 sp27 sp27a \ sp20 sp21 sp22 sp23 sp24 sp25 sp26 sp27 sp27a \
sp30 sp31 sp32 sp33 sp34 sp35 sp37 sp38 \ sp30 sp31 sp32 sp33 sp34 sp35 sp37 sp38 \
sp40 sp41 sp42 sp43 sp44 sp45 sp46 sp47 sp48 sp49 \ sp40 sp41 sp42 sp43 sp44 sp45 sp46 sp47 sp48 sp49 \

View File

@@ -85,7 +85,6 @@ sp05/Makefile
sp06/Makefile sp06/Makefile
sp07/Makefile sp07/Makefile
sp08/Makefile sp08/Makefile
sp10/Makefile
sp11/Makefile sp11/Makefile
sp12/Makefile sp12/Makefile
sp13/Makefile sp13/Makefile

View File

@@ -1,22 +0,0 @@
rtems_tests_PROGRAMS = sp10
sp10_SOURCES = init.c
dist_rtems_tests_DATA = sp10.scn
dist_rtems_tests_DATA += sp10.doc
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
include $(top_srcdir)/../automake/compile.am
include $(top_srcdir)/../automake/leaf.am
AM_CPPFLAGS += -I$(top_srcdir)/../support/include
LINK_OBJS = $(sp10_OBJECTS)
LINK_LIBS = $(sp10_LDLIBS)
sp10$(EXEEXT): $(sp10_OBJECTS) $(sp10_DEPENDENCIES)
@rm -f sp10$(EXEEXT)
$(make-exe)
include $(top_srcdir)/../automake/local.am

View File

@@ -1,69 +0,0 @@
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.org/license/LICENSE.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <tmacros.h>
const char rtems_test_name[] = "SP 10";
/* forward declarations to avoid warnings */
rtems_task Init(rtems_task_argument argument);
rtems_task Init(
rtems_task_argument ignored
)
{
bool is_set;
TEST_BEGIN();
puts( "Init - clear debug level" );
_Debug_Level = 0;
puts( "Init - rtems_debug_is_enabled - is 0x1 set? No" );
is_set = rtems_debug_is_enabled( 0x1 );
rtems_test_assert(is_set == false);
puts( "Init - rtems_debug_enable - set 0x1" );
rtems_debug_enable(0x1);
rtems_test_assert(_Debug_Level == 0x1);
puts( "Init - rtems_debug_is_enabled - is 0x1 set? Yes" );
is_set = rtems_debug_is_enabled( 0x1 );
rtems_test_assert(is_set == true);
puts( "Init - rtems_debug_disable - clear 0x1" );
rtems_debug_disable(0x1);
rtems_test_assert(_Debug_Level == 0x0);
puts( "Init - rtems_debug_is_enabled - is 0x1 set? No" );
is_set = rtems_debug_is_enabled( 0x1 );
rtems_test_assert(is_set == false);
TEST_END();
rtems_test_exit(0);
}
/* configuration information */
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
#define CONFIGURE_MAXIMUM_TASKS 1
#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_INIT
#include <rtems/confdefs.h>
/* global variables */

View File

@@ -1,21 +0,0 @@
# COPYRIGHT (c) 1989-2009.
# On-Line Applications Research Corporation (OAR).
#
# The license and distribution terms for this file may be
# found in the file LICENSE in this distribution or at
# http://www.rtems.org/license/LICENSE.
#
This file describes the directives and concepts tested by this test set.
test set name: sp10
directives:
rtems_debug_enable
rtems_debug_disable
rtems_debug_is_enabled
concepts:
+ Exercise the Debug Manager.

View File

@@ -1,8 +0,0 @@
*** TEST 10 ***
Init - clear debug level
Init - rtems_debug_is_enabled - is 0x1 set? No
Init - rtems_debug_enable - set 0x1
Init - rtems_debug_is_enabled - is 0x1 set? Yes
Init - rtems_debug_disable - clear 0x1
Init - rtems_debug_is_enabled - is 0x1 set? No
*** END OF TEST 10 ***

View File

@@ -402,12 +402,6 @@ void region_error_tests(void)
* is subject to change if the heap code changes. * is subject to change if the heap code changes.
*/ */
puts( "TA1 - rtems_debug_disable - RTEMS_DEBUG_REGION" );
rtems_debug_disable( RTEMS_DEBUG_REGION );
puts( "TA1 - rtems_debug_enable - RTEMS_DEBUG_REGION" );
rtems_debug_enable( RTEMS_DEBUG_REGION );
status = rtems_region_extend( status = rtems_region_extend(
100, 100,
Region_good_area, Region_good_area,

View File

@@ -264,8 +264,6 @@ uninitialized =
/*copyrt.h*/ 0 + /*copyrt.h*/ 0 +
/*debug.h*/ (sizeof _Debug_Level) +
/*dpmemimpl.h*/ (sizeof _Dual_ported_memory_Information) + /*dpmemimpl.h*/ (sizeof _Dual_ported_memory_Information) +
#if defined(RTEMS_MULTIPROCESSING) #if defined(RTEMS_MULTIPROCESSING)