LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-10-2004, 10:20 PM   #1
ryanux
LQ Newbie
 
Registered: Sep 2003
Posts: 7

Rep: Reputation: 0
how to debug multithread using GDB?


here is a program having two threads.when debugging ,i want to scanf the other thread .which commond should i use?
 
Old 05-11-2004, 12:58 AM   #2
shishir
Member
 
Registered: Jul 2003
Location: bangalore . india
Distribution: openSUSE 10.3
Posts: 251

Rep: Reputation: 33
you can use the command "inf thr", to see the threads running in the process, along with their LWP ids,

to switch from one thread to another, by using the command
thr <thread id>

but i dont think gdb is really that great for multi thread debugging...

there is a debugger called totalview by etnus (not a free ware.but you can download a demo copy at www.etnus.com)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how can I debug the interactinve program with GDB bigapple Programming 1 08-03-2005 09:55 PM
How to use gdb to debug child process? ariana Programming 2 05-03-2005 01:50 PM
GDB unable to debug pthreads linuxdeveloper Programming 1 03-06-2005 05:18 AM
joining in a multithread app killkolor Programming 4 02-09-2005 03:05 PM
Using gdb to debug different arhitectures george_mercury Linux - Software 1 01-07-2005 06:19 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration