rtems task

 

 

[root@centos7 hello_world_c]# aarch64-rtems6-gdb   o-optimize/hello.exe 
GNU gdb (GDB) 10.1.90.20210409-git
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "--host=aarch64-linux-gnu --target=aarch64-rtems6".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from o-optimize/hello.exe...
(gdb) target remote :8889
Remote debugging using :8889
bsp_vector_table_begin () at ../../../bsps/aarch64/shared/start/start.S:55
55        mov x5, x1    /* machine type number or ~0 for DT boot */
(gdb) b 
Breakpoint 1 at 0x40008000: file ../../../bsps/aarch64/shared/start/start.S, line 55.
(gdb) b rtems_task Init
Function "rtems_task Init" not defined.
Make breakpoint pending on future shared library load? (y or [n]) n
(gdb) b rtems_task_create
Breakpoint 2 at 0x4000ee10: file ../../../cpukit/rtems/src/taskcreate.c, line 77.
(gdb) c
Continuing.

Breakpoint 2, rtems_task_create (name=name@entry=1430860064, initial_priority=initial_priority@entry=1, stack_size=stack_size@entry=10240, initial_modes=initial_modes@entry=256, attribute_set=attribute_set@entry=0, 
    id=id@entry=0x40108c8c <_ISR_Stack_area_begin+9164>) at ../../../cpukit/rtems/src/taskcreate.c:77
77        memset( &config, 0, sizeof( config ) );
(gdb) bt
#0  rtems_task_create (name=name@entry=1430860064, initial_priority=initial_priority@entry=1, stack_size=stack_size@entry=10240, initial_modes=initial_modes@entry=256, attribute_set=attribute_set@entry=0, 
    id=id@entry=0x40108c8c <_ISR_Stack_area_begin+9164>) at ../../../cpukit/rtems/src/taskcreate.c:77
#1  0x000000004000eeac in _RTEMS_tasks_Initialize_user_task () at ../../../cpukit/rtems/src/taskinitusers.c:35
#2  0x000000004000f060 in rtems_initialize_executive () at ../../../cpukit/sapi/src/exinit.c:116
#3  0x0000000040008c7c in boot_card (cmdline=<optimized out>) at ../../../bsps/shared/start/bootcard.c:55
#4  0x00000000400080cc in _el1_start () at ../../../bsps/aarch64/shared/start/start.S:308
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) b rtems_task_start
Breakpoint 3 at 0x4000eee0: file ../../../cpukit/rtems/src/taskstart.c, line 33.
(gdb) b rtems_task_delete
Function "rtems_task_delete" not defined.
Make breakpoint pending on future shared library load? (y or [n]) n
(gdb) c
Continuing.

Breakpoint 3, rtems_task_start (id=167837697, entry_point=entry_point@entry=0x40008900 <Init>, argument=argument@entry=1074801928) at ../../../cpukit/rtems/src/taskstart.c:33
33        Thread_Entry_information entry = {
(gdb) bt
#0  rtems_task_start (id=167837697, entry_point=entry_point@entry=0x40008900 <Init>, argument=argument@entry=1074801928) at ../../../cpukit/rtems/src/taskstart.c:33
#1  0x000000004000eec0 in _RTEMS_tasks_Initialize_user_task () at ../../../cpukit/rtems/src/taskinitusers.c:47
#2  0x000000004000f060 in rtems_initialize_executive () at ../../../cpukit/sapi/src/exinit.c:116
#3  0x0000000040008c7c in boot_card (cmdline=<optimized out>) at ../../../bsps/shared/start/bootcard.c:55
#4  0x00000000400080cc in _el1_start () at ../../../bsps/aarch64/shared/start/start.S:308
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) s
46        if ( entry_point == NULL ) {
(gdb) list
41        };
42        Thread_Control   *the_thread;
43        ISR_lock_Context  lock_context;
44        Status_Control    status;
45
46        if ( entry_point == NULL ) {
47          return RTEMS_INVALID_ADDRESS;
48        }
49
50        the_thread = _Thread_Get( id, &lock_context );
(gdb) b  _Thread_Start
Breakpoint 4 at 0x40013340: file ../../../cpukit/score/src/threadstart.c, line 35.
(gdb) c
Continuing.

Breakpoint 4, _Thread_Start (the_thread=0x40102090 <_RTEMS_tasks_Objects>, entry=entry@entry=0x40108c48 <_ISR_Stack_area_begin+9096>, lock_context=lock_context@entry=0x40108c40 <_ISR_Stack_area_begin+9088>) at ../../../cpukit/score/src/threadstart.c:35
35        _Thread_State_acquire_critical( the_thread, lock_context );
(gdb) b printf
Function "printf" not defined.
Make breakpoint pending on future shared library load? (y or [n]) n
(gdb) b test.c:13
Breakpoint 5 at 0x40008900: file test.c, line 13.
(gdb) c
Continuing.

Breakpoint 5, Init (ignored=1074801928) at test.c:13
13        printf( "\n\n*** HELLO WORLD TEST ***\n" );
(gdb) bt
#0  Init (ignored=1074801928) at test.c:13
#1  0x0000000040011e64 in _Thread_Handler () at ../../../cpukit/score/src/threadhandler.c:145
#2  0x0000000040011e00 in ?? ()
Backtrace stopped: not enough registers or memory available to unwind further
(gdb) c
Continuing.
[Inferior 1 (process 1) exited normally]
(gdb) quit
[root@centos7 hello_world_c]# 

 

上一篇:hash原理、冲突以及解决方法


下一篇:手写HashMap