rtos : linux awareness
Change-Id: I41294ccaa4a3cd253919c8b1b558205903bcb695 Signed-off-by: Michel JAOUEN <michel.jaouen@stericsson.com> Reviewed-on: http://openocd.zylin.com/348 Tested-by: jenkins Reviewed-by: Heythem Bouhaja <heythem.bouhaja-nonst@stericsson.com> Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>__archive__
parent
433ca26f1a
commit
0a4b27ec4b
|
@ -23,7 +23,7 @@ include $(top_srcdir)/common.mk
|
||||||
METASOURCES = AUTO
|
METASOURCES = AUTO
|
||||||
noinst_LTLIBRARIES = librtos.la
|
noinst_LTLIBRARIES = librtos.la
|
||||||
noinst_HEADERS = rtos.h rtos_standard_stackings.h rtos_ecos_stackings.h
|
noinst_HEADERS = rtos.h rtos_standard_stackings.h rtos_ecos_stackings.h
|
||||||
librtos_la_SOURCES = rtos.c rtos_standard_stackings.c rtos_ecos_stackings.c FreeRTOS.c ThreadX.c eCos.c
|
librtos_la_SOURCES = rtos.c rtos_standard_stackings.c rtos_ecos_stackings.c FreeRTOS.c ThreadX.c eCos.c linux.c
|
||||||
|
|
||||||
librtos_la_CFLAGS =
|
librtos_la_CFLAGS =
|
||||||
if IS_MINGW
|
if IS_MINGW
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,32 @@
|
||||||
|
/* gdb script to update the header file
|
||||||
|
according to kernel version and build option
|
||||||
|
before executing function awareness
|
||||||
|
kernel symbol must be loaded : symbol vmlinux
|
||||||
|
|
||||||
|
define awareness
|
||||||
|
set logging off
|
||||||
|
set logging file linux_header.h
|
||||||
|
set logging on
|
||||||
|
|
||||||
|
printf "#define QAT %p\n",&((struct task_struct *)(0))->stack
|
||||||
|
set $a=&((struct list_head *)(0))->next
|
||||||
|
set $a=(int)$a+(int)&((struct task_struct *)(0))->tasks
|
||||||
|
printf "#define NEXT %p\n",$a
|
||||||
|
printf "#define COMM %p\n",&((struct task_struct *)(0))->comm
|
||||||
|
printf "#define MEM %p\n",&((struct task_struct *)(0))->mm
|
||||||
|
printf "#define ONCPU %p\n",&((struct task_struct *)(0))->on_cpu
|
||||||
|
printf "#define PID %p\n",&((struct task_struct *)(0))->pid
|
||||||
|
printf "#define CPU_CONT %p\n",&((struct thread_info *)(0))->cpu_context
|
||||||
|
printf "#define PREEMPT %p\n",&((struct thread_info *)(0))->preempt_count
|
||||||
|
printf "#define MM_CTX %p\n",&((struct mm_struct *)(0))->context
|
||||||
|
end
|
||||||
|
*/
|
||||||
|
#define QAT 0x4
|
||||||
|
#define NEXT 0x1b0
|
||||||
|
#define COMM 0x2d4
|
||||||
|
#define MEM 0x1cc
|
||||||
|
#define ONCPU 0x18
|
||||||
|
#define PID 0x1f4
|
||||||
|
#define CPU_CONT 0x1c
|
||||||
|
#define PREEMPT 0x4
|
||||||
|
#define MM_CTX 0x160
|
|
@ -37,12 +37,14 @@ static void hex_to_str( char* dst, char * hex_src );
|
||||||
extern struct rtos_type FreeRTOS_rtos;
|
extern struct rtos_type FreeRTOS_rtos;
|
||||||
extern struct rtos_type ThreadX_rtos;
|
extern struct rtos_type ThreadX_rtos;
|
||||||
extern struct rtos_type eCos_rtos;
|
extern struct rtos_type eCos_rtos;
|
||||||
|
extern struct rtos_type Linux_os;
|
||||||
|
|
||||||
static struct rtos_type *rtos_types[] =
|
static struct rtos_type *rtos_types[] =
|
||||||
{
|
{
|
||||||
&ThreadX_rtos,
|
&ThreadX_rtos,
|
||||||
&FreeRTOS_rtos,
|
&FreeRTOS_rtos,
|
||||||
&eCos_rtos,
|
&eCos_rtos,
|
||||||
|
&Linux_os,
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue