Debugging an RTEMS Application, show threads in gdb possible

Matthias Goldhoorn matthias.goldhoorn at uni-bremen.de
Wed Nov 14 10:27:32 UTC 2012


On 12.11.2012 12:29, Sebastian Huber wrote:
> Hello,
>
> I cannot say much to the GDB support since I mainly use the Lauterbach 
> debugger, but there is some GDB support mentioned here:
>
> http://www.rtems.org/wiki/index.php/GDB_Python
>
> You can also start the RTEMS shell and use the "task", "sema", 
> "cpuuse", etc. commands to figure out the system state.
>
Hi Again,
i got these scripts running.
I got output like:

(gdb) rtems_posix_threads
=====================================================================
# | Name | ID | Pri | Nsecs | State
---+------+----------+-----+--------------+------------------------------
1 | | 0b010001 | 253 | 921902273 | DELAY
2 | | 0b010002 | 253 | 23244932 | DORM Wbuf
3 | | 0b010003 | 253 | 848975 | Wcvar
4 | | 0b010004 | 253 | 475098 | Wsem
5 | | 0b010005 | 253 | 10752105 | DELAY
6 | | 0b010006 | 253 | 717069 | Wsem
7 | | 0b010007 | 254 | 768276 | Wcvar
8 | | 0b010008 | 253 | 44815995 | SUSP TRANS


the detailed function seems not to work:
(gdb) rtems_posix_thread 2
=====================================================================
# | Name | ID | Pri | Nsecs | State
---+------+----------+-----+--------------+------------------------------
2 | | 0b010002 | 253 | 23244932 | DORM Wbuf
BACKTRACE

I don't see any Backtrace here, only the word "BACKTRACE" there is one 
additional helper funtion:
rtems_task_backtrack

which requires arg0 = pointer to the Thread_Control_struct of the task. 
which i don't have.

The standard console gives me similar output (and for reasons i 
currently don’t understand stop's my program, but whatever).
How are you guys debugging thinks like this. My Application simply hangs 
i need the backtrace of the current threads to get into this...
One Thread is anywhere blocked, don't know if i get an deadlock or 
something else, is there no way to get the backtraces of all running 
threads in rtems?

Greetings,
Matthias

-- 
  Dipl.-Inf. Matthias Goldhoorn
  Space and Underwater Robotic

  Universität Bremen
  FB 3 - Mathematik und Informatik
  AG Robotik
  Robert-Hooke-Straße 5
  28359 Bremen, Germany

  Tel.:     +49 421 178 45-4193
  Zentrale: +49 421 178 45-6550
  Fax:      +49 421 178 45-4150
  E-Mail:   matthias.goldhoorn at uni-bremen.de

  Weitere Informationen: http://www.informatik.uni-bremen.de/robotik




More information about the users mailing list