debuging and newlxrt

Wolfgang Köbler wolfgang at koebler.com
Sat Nov 30 23:56:20 CET 2002


Hi,

This mail is about multithreaded debuging using newlxrt (rtai-24.1.10,
integrated-soft-hard, linux-2.4.18 rthal5, ddd/gdb, debian woody, duron 700, 
via chipset)

I created a userspace program with newlxrt. It has two threads, both soft
realtime. As soon as one thread makes a blocking call to a kernel-space
function (via lxrt), the other thread is also suspended. This happens at
least when stepping through the program with the debugger. There is a litte
test program attatched, which shows the effect. I did not see this effect
with the old lxrt.

This test progam switches to soft realtime (thread1). Then it starts a
posix thread (thread2). Thread2 switches to soft realtime and calls a
blocking rtai function (for simplicity, rt_sleep is used). One should expect
that thread1 can go on executing while tread2 is sleeping. This is not the
case. Thread1 only executes after thread2 has terminated.
This effect is seen when you step through thread1. This effect is not seen
when you just run the program inside or outside the debugger.

In a more complex application i created (also using rtai_pthreads and an
extension to lxrt), it is not required to step through the program to get the
effect. It is sufficient to run the application within the debugger.

What is the expected behavior when debugging newlxrt programs ?
What needs to be done to improve debug behaviour ?


Bye,
Wolfgang Köbler

-------------- next part --------------
A non-text attachment was scrubbed...
Name: newlxrtdebug.tgz
Type: application/octet-stream
Size: 24187 bytes
Desc: newlxrtdebug.tgz
Url : http://mail.rtai.org/pipermail/rtai/attachments/20021130/c5e01c1d/attachment.obj 


More information about the Rtai mailing list