debug: remove option GDB_INFO
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
d0c2be7c8a
commit
ff42bdd0a0
8 changed files with 16 additions and 58 deletions
|
@ -35,11 +35,7 @@
|
|||
GEN_OFFSET_SYM(_kernel_arch_t, isf);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_GDB_INFO
|
||||
GEN_OFFSET_SYM(_thread_arch_t, esf);
|
||||
#endif
|
||||
|
||||
#if (defined(CONFIG_FP_SHARING) || defined(CONFIG_GDB_INFO))
|
||||
#if defined(CONFIG_FP_SHARING)
|
||||
GEN_OFFSET_SYM(_thread_arch_t, excNestCount);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -110,30 +110,13 @@ SECTION_FUNC(TEXT, _exception_enter)
|
|||
|
||||
/* ESP is pointing to the ESF at this point */
|
||||
|
||||
#if defined(CONFIG_FP_SHARING) || defined(CONFIG_GDB_INFO)
|
||||
#if defined(CONFIG_FP_SHARING)
|
||||
|
||||
movl _kernel + _kernel_offset_to_current, %edx
|
||||
|
||||
/* inc exception nest count */
|
||||
incl _thread_offset_to_excNestCount(%edx)
|
||||
|
||||
#ifdef CONFIG_GDB_INFO
|
||||
|
||||
/*
|
||||
* Save the pointer to the stack frame (NANO_ESF *) in
|
||||
* the current execution context if this is the outermost exception.
|
||||
* The ESF pointer is used by debug tools to locate the volatile
|
||||
* registers and the stack of the preempted thread.
|
||||
*/
|
||||
|
||||
testb $_EXC_ACTIVE, _thread_offset_to_thread_state(%edx)
|
||||
jne alreadyInException
|
||||
movl %esp, _thread_offset_to_esf(%edx)
|
||||
|
||||
alreadyInException:
|
||||
|
||||
#endif /* CONFIG_GDB_INFO */
|
||||
|
||||
/*
|
||||
* Set the _EXC_ACTIVE state bit of the current thread.
|
||||
* This enables _Swap() to preserve the thread's FP registers
|
||||
|
@ -144,7 +127,7 @@ alreadyInException:
|
|||
|
||||
orb $_EXC_ACTIVE, _thread_offset_to_thread_state(%edx)
|
||||
|
||||
#endif /* CONFIG_FP_SHARING || CONFIG_GDB_INFO */
|
||||
#endif /* CONFIG_FP_SHARING
|
||||
|
||||
/*
|
||||
* restore interrupt enable state, then call the handler
|
||||
|
@ -174,7 +157,7 @@ allDone:
|
|||
addl $0x4, %esp
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_FP_SHARING) || defined(CONFIG_GDB_INFO)
|
||||
#if defined(CONFIG_FP_SHARING)
|
||||
|
||||
movl _kernel + _kernel_offset_to_current, %ecx
|
||||
|
||||
|
@ -204,7 +187,7 @@ allDone:
|
|||
andb $~_EXC_ACTIVE, _thread_offset_to_thread_state(%ecx)
|
||||
|
||||
nestedException:
|
||||
#endif /* CONFIG_FP_SHARING || CONFIG_GDB_INFO */
|
||||
#endif /* CONFIG_FP_SHARING */
|
||||
|
||||
/*
|
||||
* Pop the non-volatile registers from the stack.
|
||||
|
|
|
@ -319,7 +319,7 @@ alreadyOnIntStack:
|
|||
* debug tools that a preemptive context switch has occurred.
|
||||
*/
|
||||
|
||||
#if defined(CONFIG_FP_SHARING) || defined(CONFIG_GDB_INFO)
|
||||
#if defined(CONFIG_FP_SHARING)
|
||||
orb $_INT_ACTIVE, _thread_offset_to_thread_state(%edx)
|
||||
#endif
|
||||
|
||||
|
@ -365,8 +365,7 @@ alreadyOnIntStack:
|
|||
* returning control to it at the point where it was interrupted ...
|
||||
*/
|
||||
|
||||
#if ( defined(CONFIG_FP_SHARING) || \
|
||||
defined(CONFIG_GDB_INFO) )
|
||||
#if defined(CONFIG_FP_SHARING)
|
||||
/*
|
||||
* __swap() has restored the floating point registers, if needed.
|
||||
* Clear the _INT_ACTIVE bit in the interrupted thread's state
|
||||
|
@ -375,7 +374,7 @@ alreadyOnIntStack:
|
|||
|
||||
movl _kernel + _kernel_offset_to_current, %eax
|
||||
andb $~_INT_ACTIVE, _thread_offset_to_thread_state(%eax)
|
||||
#endif /* CONFIG_FP_SHARING || CONFIG_GDB_INFO */
|
||||
#endif /* CONFIG_FP_SHARING */
|
||||
|
||||
/* Restore volatile registers and return to the interrupted thread */
|
||||
#ifdef CONFIG_INT_LATENCY_BENCHMARK
|
||||
|
|
|
@ -36,11 +36,7 @@
|
|||
GEN_OFFSET_SYM(_kernel_arch_t, isf);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_GDB_INFO
|
||||
GEN_OFFSET_SYM(_thread_arch_t, esf);
|
||||
#endif
|
||||
|
||||
#if (defined(CONFIG_FP_SHARING) || defined(CONFIG_GDB_INFO))
|
||||
#if defined(CONFIG_FP_SHARING)
|
||||
GEN_OFFSET_SYM(_thread_arch_t, excNestCount);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -393,8 +393,7 @@ time_read_not_needed:
|
|||
#endif
|
||||
ret
|
||||
|
||||
#if defined(CONFIG_GDB_INFO) || defined(CONFIG_DEBUG_INFO) \
|
||||
|| defined(CONFIG_X86_IAMCU)
|
||||
#if defined(CONFIG_DEBUG_INFO) || defined(CONFIG_X86_IAMCU)
|
||||
/**
|
||||
*
|
||||
* @brief Adjust stack/parameters before invoking thread entry function
|
||||
|
@ -465,7 +464,7 @@ SECTION_FUNC(TEXT, _x86_thread_entry_wrapper)
|
|||
pop %edx
|
||||
pop %ecx
|
||||
push $0 /* Null return address */
|
||||
#elif defined(CONFIG_GDB_INFO) || defined(CONFIG_DEBUG_INFO)
|
||||
#elif defined(CONFIG_DEBUG_INFO)
|
||||
movl $0, (%esp) /* zero initialEFLAGS location */
|
||||
#endif
|
||||
jmp *%edi
|
||||
|
|
|
@ -28,8 +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_GDB_INFO) || defined(CONFIG_DEBUG_INFO) || \
|
||||
defined(CONFIG_X86_IAMCU)
|
||||
#if defined(CONFIG_DEBUG_INFO) || defined(CONFIG_X86_IAMCU)
|
||||
#define WRAPPER_REQUIRED
|
||||
#endif
|
||||
|
||||
|
@ -135,9 +134,9 @@ void _new_thread(struct k_thread *thread, k_thread_stack_t *stack,
|
|||
*/
|
||||
thread->callee_saved.esp = (unsigned long)initial_frame;
|
||||
|
||||
#if (defined(CONFIG_FP_SHARING) || defined(CONFIG_GDB_INFO))
|
||||
#if defined(CONFIG_FP_SHARING)
|
||||
thread->arch.excNestCount = 0;
|
||||
#endif /* CONFIG_FP_SHARING || CONFIG_GDB_INFO */
|
||||
#endif /* CONFIG_FP_SHARING */
|
||||
#ifdef CONFIG_THREAD_MONITOR
|
||||
thread->entry = (struct __thread_entry *)&initial_frame->entry;
|
||||
thread_monitor_init(thread);
|
||||
|
|
|
@ -241,19 +241,14 @@ typedef struct s_preempFloatReg {
|
|||
|
||||
struct _thread_arch {
|
||||
|
||||
#ifdef CONFIG_GDB_INFO
|
||||
/* pointer to ESF saved by outermost exception wrapper */
|
||||
void *esf;
|
||||
#endif
|
||||
|
||||
#if (defined(CONFIG_FP_SHARING) || defined(CONFIG_GDB_INFO))
|
||||
#if defined(CONFIG_FP_SHARING)
|
||||
/*
|
||||
* Nested exception count to maintain setting of EXC_ACTIVE flag across
|
||||
* outermost exception. EXC_ACTIVE is used by _Swap() lazy FP
|
||||
* save/restore and by debug tools.
|
||||
*/
|
||||
unsigned excNestCount; /* nested exception count */
|
||||
#endif /* CONFIG_FP_SHARING || CONFIG_GDB_INFO */
|
||||
#endif /* CONFIG_FP_SHARING */
|
||||
|
||||
/*
|
||||
* The location of all floating point related structures/fields MUST be
|
||||
|
|
|
@ -164,15 +164,6 @@ config DEBUG_INFO
|
|||
# Miscellaneous debugging options
|
||||
#
|
||||
|
||||
config GDB_INFO
|
||||
bool
|
||||
prompt "Thread-aware debugging with GDB"
|
||||
default n
|
||||
help
|
||||
This option enables the kernel to collect additional information
|
||||
during interrupts, exceptions, and context switches. This information
|
||||
is required for thread-aware debugging with GDB.
|
||||
|
||||
config OPENOCD_SUPPORT
|
||||
bool
|
||||
prompt "OpenOCD support [EXPERIMENTAL]"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue