debug: thread monitor allow to access more thread information
The thread monitor allows to iterate over the thread context structures for each existing thread (fiber/task) in the system. Thread context structures do not expose thread entry information directly. Although all the information can be scavenged from memory stacks. Besides, accessing the information depends on the stack implementation for each architecture. By extending the tcs we allow a direct access to the thread entry point and its parameters, only when thread monitor is enabled. It also allows a task to access its kernel task structure through the first parameter of the thread. This allows a debugger application to access the information directly from the thread context structures list. Change-Id: I0a435942b80eddffdf405016ac4056eb7aa1239c Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@intel.com>
This commit is contained in:
parent
5f566034e5
commit
d151776e59
7 changed files with 63 additions and 1 deletions
|
@ -45,6 +45,16 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
#ifndef _ASMLANGUAGE
|
||||
|
||||
#ifdef CONFIG_THREAD_MONITOR
|
||||
struct __thread_entry {
|
||||
_thread_entry_t pEntry;
|
||||
void *parameter1;
|
||||
void *parameter2;
|
||||
void *parameter3;
|
||||
};
|
||||
#endif /*CONFIG_THREAD_MONITOR*/
|
||||
|
||||
struct coop {
|
||||
/*
|
||||
* Unused for Cortex-M, which automatically saves the neccesary
|
||||
|
@ -120,6 +130,7 @@ struct tcs {
|
|||
struct coop coopReg;
|
||||
struct preempt preempReg;
|
||||
#if defined(CONFIG_THREAD_MONITOR)
|
||||
struct __thread_entry *entry; /* thread entry and parameters description */
|
||||
struct tcs *next_thread; /* next item in list of ALL fiber+tasks */
|
||||
#endif
|
||||
#ifdef CONFIG_NANO_TIMEOUTS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue