Download TSIM2 Simulator User`s Manual

Transcript
TSIM2 Simulator User's Manual
14
Profiling an application executed from gdb is possible if the symbol table is loaded in TSIM before execution
is started. gdb does not download the symbol information to TSIM, so the symbol table should be loaded
using the monitor command:
(gdb) monitor sym t4.exe
read 158 symbols
When an application that has been compiled using the gcc -mflat option is debugged through gdb, TSIM
should be started with -mflat in order to generate the correct stack frames to gdb.
3.12. Thread support
TSIM has thread support for the RTEMS operating system. Additional OS support will be added to future
versions. The GDB interface of TSIM is also thread aware and the related GDB commands are described
later.
3.12.1. TSIM thread commands
thread info - lists all known threads. The currently running thread is marked with an asterisk. (The wide
example output below has been split into two parts.)
tsim> thread info
Name | Type
| Id
| Prio | Time (h:m:s) | Entry point
-------------------------------------------------------------------------------Int. | internal | 0x09010001 | 255 |
5:30.682722 | bsp_idle_thread
-------------------------------------------------------------------------------UI1 | classic | 0x0a010001 | 100 |
0.041217 | system_init
-------------------------------------------------------------------------------ntwk | classic | 0x0a010002 | 100 |
0.251199 | soconnsleep
-------------------------------------------------------------------------------ETH0 | classic | 0x0a010003 | 100 |
0.000161 | soconnsleep
-------------------------------------------------------------------------------* TA1 | classic | 0x0a010004 |
1 |
0.034739 | prep_timer
-------------------------------------------------------------------------------TA2 | classic | 0x0a010005 |
1 |
0.025740 | prep_timer
-------------------------------------------------------------------------------TA3 | classic | 0x0a010006 |
1 |
0.021357 | prep_timer
-------------------------------------------------------------------------------TTCP | classic | 0x0a010007 | 100 |
0.002914 | rtems_ttcp_main
--------------------------------------------------------------------------------
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
| PC
| State
------------------------------------------------------| 0x40044bec _Thread_Dispatch + 0xd8
| READY
------------------------------------------------------| 0x40044bec _Thread_Dispatch + 0xd8
| SUSP
------------------------------------------------------| 0x40044bec _Thread_Dispatch + 0xd8
| READY
------------------------------------------------------| 0x40044bec _Thread_Dispatch + 0xd8
| Wevnt
------------------------------------------------------| 0x40006a28 printf + 0x4
| READY
------------------------------------------------------| 0x40044bec _Thread_Dispatch + 0xd8
| DELAY
------------------------------------------------------| 0x40044bec _Thread_Dispatch + 0xd8
| DELAY
------------------------------------------------------| 0x40044bec _Thread_Dispatch + 0xd8
| Wevnt
-------------------------------------------------------
thread bt id prints a backtrace of a thread.
tsim> thread bt 0x0a010007
#0
#1
#2
%%pc
0x40044bec
0x400418f8
0x40031eb4
_Thread_Dispatch + 0xd8
rtems_event_receive + 0x74
rtems_bsdnet_event_receive + 0x18
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...