Multithreaded debugging with gdb
Gregor Mi
codestruct at posteo.org
Sun Dec 14 19:48:39 GMT 2014
On 30/11/14 17:45, Milian Wolff wrote:
> On Sunday 30 November 2014 16:50:52 Gregor Mi wrote:
>> On 30/11/14 14:59, Milian Wolff wrote:
>>> On Saturday 29 November 2014 23:53:15 Gregor Mi wrote:
>>>> Hello,
>>>>
>>>> I am debugging a QT app that used QtConcurrent::run with kdevelop/gdb.
>>>> The
>>>> application hangs until the run method is completed.
>>>>
>>>> Is this a gdb issue (like here [1]) or am I maybe missing some QT
>>>> specific
>>>> setting?
>>>
>>> Have you tried the example in the bug report? What version of GDB are you
>>> using?
>>
>> No, I did not try the example. I was debugging ksnapshot for this RR:
>> https://git.reviewboard.kde.org/r/120920/ and I was wondering why the
>> application window is blocked. It leads to the case that I cannot debug
>> code that is executed while the menu is still constructed.
>
> Well then, try the example. It's simple to compile, really and just takes a
> few seconds to verify it's GDB's fault.
>
>> So I understand that this is not a general issue with QT/KDE and there are
>> not special settings.
>>
>> GNU gdb (GDB; openSUSE 13.2) 7.8
>
> Is that 7.8.0? Afaik that was indeed the faulty release.
>
> Anyhow, if you'd read the bugreport you'd also see there is a workaround,
> which you can also test: Sent any signal, e.g. SIGCONT, to GDB to let it
> continue.
>
> while true; do killall -s SIGCONT gdb || break; done
>
> Bye
>
Hi Milian,
I tried your example. Was easy indeed. :-) As I understand, gdb should hang after two
"hello world"s or so. I tried with gdb-7.8 and gdb-7.8.1. With both versions the program
exits normally:
```
(gdb) run
Starting program: /home/gregor/Documents/rc/mdwiki/gdb/test
Got object file from memory but can't read symbols: File truncated.
Missing separate debuginfos, use: zypper install glibc-debuginfo-2.19-16.2.5.x86_64
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7ffff6ff6700 (LWP 3149)]
hello world!
[New Thread 0x7ffff67f5700 (LWP 3150)]
hello world!
[Thread 0x7ffff6ff6700 (LWP 3149) exited]
[Thread 0x7ffff67f5700 (LWP 3150) exited]
[New Thread 0x7ffff5ff4700 (LWP 3152)]
hello world!
[Thread 0x7ffff5ff4700 (LWP 3152) exited]
[New Thread 0x7ffff57f3700 (LWP 3153)]
hello world!
[Thread 0x7ffff57f3700 (LWP 3153) exited]
[Inferior 1 (process 3145) exited normally]
Missing separate debuginfos, use: zypper install
libgcc_s1-debuginfo-4.8.3+r212056-2.2.4.x86_64 libstdc++6-debuginfo-4.8.3+r212056-2.2.4.x86_64
```
For me the topic is solved for now.
Regards
Gregor
More information about the KDevelop
mailing list