debug threads in gdb

This is a discussion on debug threads in gdb within the C Programming forums, part of the General Programming Boards category; how do I switch from one thread to another in the program with gdb......?...

  1. #1
    Registered User
    Join Date
    Sep 2006
    Posts
    11

    debug threads in gdb

    how do I switch from one thread to another in the program with gdb......?

  2. #2
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,412
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  3. #3
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,412
    Also note that watchpoints are particularly useful in thread debugging (on par with breakpoints). Make sure you read about them.
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  4. #4
    Registered User
    Join Date
    Sep 2006
    Posts
    11
    this question may sound dumb.. but can I switch into another thread in the middle of execution and start from where it has stoped when the program hit the breakpoint.

    for example say i place a break point in thread 1 and when I hit that I want to get sm information there and then switch to thread 2 and take small steps in thread 2 (line next and step). can I do that and if yes how. (I dint find any command for that yet in the link you gave me .......) thanx

  5. #5
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,412
    The link I gave you gives you the commands for that. How about reading it?
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. gdb debug issues
    By disruptivetech in forum C Programming
    Replies: 1
    Last Post: 10-20-2008, 04:08 PM
  2. buffered vs unbuffered question
    By Overworked_PhD in forum Linux Programming
    Replies: 6
    Last Post: 07-04-2008, 04:57 PM
  3. Contiguous Array version of Linked List
    By ampersand11 in forum C Programming
    Replies: 19
    Last Post: 10-07-2007, 03:05 AM
  4. Too much output in GDB
    By MacNilly in forum Tech Board
    Replies: 0
    Last Post: 09-13-2006, 12:45 PM
  5. does gdb lie?
    By dinjas in forum C Programming
    Replies: 8
    Last Post: 03-10-2005, 04:17 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21