debug: remove DEBUG_INFO option
This feature is X86 only and is not used or being tested. It is legacy feature and no one can prove it actually works. Remove it until we have proper documentation and samples and multi architecture support. Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
ff42bdd0a0
commit
11a9625eaf
11 changed files with 2 additions and 141 deletions
|
@ -31,10 +31,6 @@
|
|||
|
||||
#include <kernel_offsets.h>
|
||||
|
||||
#ifdef CONFIG_DEBUG_INFO
|
||||
GEN_OFFSET_SYM(_kernel_arch_t, isf);
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_FP_SHARING)
|
||||
GEN_OFFSET_SYM(_thread_arch_t, excNestCount);
|
||||
#endif
|
||||
|
|
|
@ -5,8 +5,6 @@ endif()
|
|||
|
||||
zephyr_compile_options($<$<COMPILE_LANGUAGE:ASM>:-Wa,--divide>)
|
||||
|
||||
add_subdirectory_ifdef(CONFIG_DEBUG_INFO debug)
|
||||
|
||||
zephyr_sources(
|
||||
cache.c
|
||||
cache_s.S
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2015 Wind River Systems, Inc.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @brief Stack frames for debugging purposes
|
||||
*
|
||||
* This file contains a routine useful for debugging that gets a pointer to
|
||||
* the current interrupt stack frame.
|
||||
*/
|
||||
|
||||
#include <kernel.h>
|
||||
#include <kernel_structs.h>
|
||||
|
||||
NANO_ISF *sys_debug_current_isf_get(void)
|
||||
{
|
||||
return _kernel.arch.isf;
|
||||
}
|
|
@ -139,19 +139,6 @@ SECTION_FUNC(TEXT, _interrupt_enter)
|
|||
*/
|
||||
pushl %edi
|
||||
|
||||
#ifdef CONFIG_DEBUG_INFO
|
||||
/*
|
||||
* Push the cooperative registers on the existing stack as they are
|
||||
* required by debug tools.
|
||||
*/
|
||||
|
||||
pushl %esi
|
||||
pushl %ebx
|
||||
pushl %ebp
|
||||
|
||||
leal 40(%esp), %ecx /* Calculate ESP before interrupt occurred */
|
||||
pushl %ecx /* Save calculated ESP */
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_INT_LATENCY_BENCHMARK) || \
|
||||
defined(CONFIG_KERNEL_EVENT_LOGGER_INTERRUPT) || \
|
||||
|
@ -194,11 +181,7 @@ SECTION_FUNC(TEXT, _interrupt_enter)
|
|||
|
||||
/* use interrupt stack if not nested */
|
||||
cmpl $1, _kernel_offset_to_nested(%ecx)
|
||||
#ifdef CONFIG_DEBUG_INFO
|
||||
jne nested_save_isf
|
||||
#else
|
||||
jne alreadyOnIntStack
|
||||
#endif
|
||||
|
||||
/*
|
||||
* switch to base of the interrupt stack: save esp in edi, then load
|
||||
|
@ -213,31 +196,12 @@ SECTION_FUNC(TEXT, _interrupt_enter)
|
|||
|
||||
pushl %edi /* Save stack pointer */
|
||||
|
||||
#ifdef CONFIG_DEBUG_INFO
|
||||
/*
|
||||
* The saved stack pointer happens to match the address of the
|
||||
* interrupt stack frame. To simplify the exit case, push a dummy ISF
|
||||
* for the "old" ISF and save it to the _kernel.isf.
|
||||
*/
|
||||
pushl %edi
|
||||
movl %edi, _kernel_offset_to_isf(%ecx)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SYS_POWER_MANAGEMENT
|
||||
cmpl $0, _kernel_offset_to_idle(%ecx)
|
||||
jne handle_idle
|
||||
/* fast path is !idle, in the pipeline */
|
||||
#endif /* CONFIG_SYS_POWER_MANAGEMENT */
|
||||
|
||||
#ifdef CONFIG_DEBUG_INFO
|
||||
jmp alreadyOnIntStack
|
||||
|
||||
nested_save_isf:
|
||||
movl _kernel_offset_to_isf(%ecx), %edi /* Get old ISF */
|
||||
movl %esp, _kernel_offset_to_isf(%ecx) /* Save new ISF */
|
||||
pushl %edi /* Save old ISF */
|
||||
#endif
|
||||
|
||||
/* fall through to nested case */
|
||||
|
||||
alreadyOnIntStack:
|
||||
|
@ -290,9 +254,6 @@ alreadyOnIntStack:
|
|||
|
||||
/* determine whether exiting from a nested interrupt */
|
||||
movl $_kernel, %ecx
|
||||
#ifdef CONFIG_DEBUG_INFO
|
||||
popl _kernel_offset_to_isf(%ecx) /* Restore old ISF */
|
||||
#endif
|
||||
decl _kernel_offset_to_nested(%ecx) /* dec interrupt nest count */
|
||||
jne nestedInterrupt /* 'iret' if nested case */
|
||||
|
||||
|
@ -333,13 +294,6 @@ alreadyOnIntStack:
|
|||
|
||||
popl %esp /* switch back to outgoing thread's stack */
|
||||
|
||||
#ifdef CONFIG_DEBUG_INFO
|
||||
popl %ebp /* Discard saved ESP */
|
||||
popl %ebp
|
||||
popl %ebx
|
||||
popl %esi
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_TIMESLICING)
|
||||
call _update_time_slice_before_swap
|
||||
#endif
|
||||
|
@ -417,12 +371,6 @@ nestedInterrupt:
|
|||
call _int_latency_stop
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_INFO
|
||||
popl %ebp /* Discard saved ESP */
|
||||
popl %ebp
|
||||
popl %ebx
|
||||
popl %esi
|
||||
#endif
|
||||
popl %edi
|
||||
popl %ecx /* pop volatile registers in reverse order */
|
||||
popl %edx
|
||||
|
|
|
@ -32,10 +32,6 @@
|
|||
|
||||
#include <kernel_offsets.h>
|
||||
|
||||
#ifdef CONFIG_DEBUG_INFO
|
||||
GEN_OFFSET_SYM(_kernel_arch_t, isf);
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_FP_SHARING)
|
||||
GEN_OFFSET_SYM(_thread_arch_t, excNestCount);
|
||||
#endif
|
||||
|
|
|
@ -393,7 +393,7 @@ time_read_not_needed:
|
|||
#endif
|
||||
ret
|
||||
|
||||
#if defined(CONFIG_DEBUG_INFO) || defined(CONFIG_X86_IAMCU)
|
||||
#if defined(CONFIG_X86_IAMCU)
|
||||
/**
|
||||
*
|
||||
* @brief Adjust stack/parameters before invoking thread entry function
|
||||
|
@ -464,8 +464,6 @@ SECTION_FUNC(TEXT, _x86_thread_entry_wrapper)
|
|||
pop %edx
|
||||
pop %ecx
|
||||
push $0 /* Null return address */
|
||||
#elif defined(CONFIG_DEBUG_INFO)
|
||||
movl $0, (%esp) /* zero initialEFLAGS location */
|
||||
#endif
|
||||
jmp *%edi
|
||||
#endif
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
/* Some configurations require that the stack/registers be adjusted before
|
||||
* _thread_entry. See discussion in swap.S for _x86_thread_entry_wrapper()
|
||||
*/
|
||||
#if defined(CONFIG_DEBUG_INFO) || defined(CONFIG_X86_IAMCU)
|
||||
#if defined(CONFIG_X86_IAMCU)
|
||||
#define WRAPPER_REQUIRED
|
||||
#endif
|
||||
|
||||
|
|
|
@ -401,9 +401,6 @@ extern "C" {
|
|||
|
||||
|
||||
struct _kernel_arch {
|
||||
#if defined(CONFIG_DEBUG_INFO)
|
||||
NANO_ISF *isf; /* ptr to interrupt stack frame */
|
||||
#endif
|
||||
};
|
||||
|
||||
typedef struct _kernel_arch _kernel_arch_t;
|
||||
|
|
|
@ -48,9 +48,6 @@ extern "C" {
|
|||
typedef struct __esf __esf_t;
|
||||
|
||||
struct _kernel_arch {
|
||||
#if defined(CONFIG_DEBUG_INFO)
|
||||
NANO_ISF *isf; /* ptr to interrupt stack frame */
|
||||
#endif
|
||||
};
|
||||
|
||||
typedef struct _kernel_arch _kernel_arch_t;
|
||||
|
|
|
@ -350,12 +350,6 @@ struct _x86_syscall_stack_frame {
|
|||
*/
|
||||
|
||||
typedef struct nanoIsf {
|
||||
#ifdef CONFIG_DEBUG_INFO
|
||||
unsigned int esp;
|
||||
unsigned int ebp;
|
||||
unsigned int ebx;
|
||||
unsigned int esi;
|
||||
#endif /* CONFIG_DEBUG_INFO */
|
||||
unsigned int edi;
|
||||
unsigned int ecx;
|
||||
unsigned int edx;
|
||||
|
|
|
@ -1,42 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2015-2016 Wind River Systems, Inc.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @brief Information necessary for debugging
|
||||
*
|
||||
* @internal No routine is provided for getting the current exception stack
|
||||
* frame as the exception handler already has knowledge of the ESF.
|
||||
*/
|
||||
|
||||
#ifndef __DEBUG_INFO_H
|
||||
#define __DEBUG_INFO_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <kernel.h>
|
||||
|
||||
#ifndef _ASMLANGUAGE
|
||||
|
||||
/**
|
||||
* @brief Get the current interrupt stack frame
|
||||
*
|
||||
* @details This routine (only called from an ISR) returns a
|
||||
* pointer to the current interrupt stack frame.
|
||||
*
|
||||
* @return pointer the current interrupt stack frame
|
||||
*/
|
||||
extern NANO_ISF *sys_debug_current_isf_get(void);
|
||||
|
||||
#endif /* _ASMLANGUAGE */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __DEBUG_INFO_H */
|
Loading…
Add table
Add a link
Reference in a new issue