You are here:

C++/GDB with threading

Advertisement


Question
hi
how could  debugg my code in which i use thread using  GDB  .
manis

Answer
Hi Manish,
 Not all systems having GDB support threads. On your GDB execution for a multithreaded program, please type:
info thread
on the GDB prompt. This would display the thread ids of all the threads in that process if the GDB on your system supports debugging of threads.
Then you could use the "thread" command and the id of a thread to debug that thread.

Thanks,
RaiD

C++

All Answers


Answers by Expert:


Ask Experts

Volunteer


Dharmender Rai

Expertise

I can answer general and system level C/C++ questions.

Experience

I have 5 years of experience in C++.

©2016 About.com. All rights reserved.