List Info

Thread: Array




Array
user name
2006-11-16 22:47:51
Hi Volodya,

Kdevelop has the problem that multithreaded apps don't show
a correct
callstack for each of the threads. Callstacks of threads
after the
first show the callstack of the first. Worse,  information
from
different threads is used (e.g. stack-depth) and applied to
others.

It seems that
void FramestackWidget::getBacktraceForThread(int threadNo)
{
    unsigned currentThread =
controller_->currentThread();
    if (viewedThread_)
    {
        // Switch to the target thread.
        controller_->addCommand(
            new GDBCommand(QString("-thread-select
%1")
                           .arg(threadNo).ascii()));

        viewedThread_ = findThread(threadNo);
    }

    getBacktrace();

     if (viewedThread_)
     {
         // Switch back to the original thread.
         controller_->addCommand(
             new GDBCommand(QString("-thread-select
%1")
                            .arg(currentThread).ascii()));
     }
}

is buggy.
Problem:
First the thread is switched to the one we want infos from.
Then
getBacktrace is called, which queues another command
(-stack-info-depth). And returns immediately. After that
-thread-select is queued.
The actual command to get the backtrace is queued through
the
completion handler of -stack-info-depth. But sadly after the
above
method was left and after the thread was switched back to
the initial
one.

Er, you know what I mean? ;)

HTH,
Stephan

_______________________________________________
KDevelop-devel mailing list
KDevelop-develbarney.cs.uni-potsdam.de
https://barney.cs.uni-potsdam.de/mailman/listinf
o/kdevelop-devel
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )