debug symbols?

This is a discussion on debug symbols? within the C++ Programming forums, part of the General Programming Boards category; How can i add debug symbols so i can see whats going on better. BTW i'm on devc++4 . GDB ...

  1. #1
    Registered User
    Join Date
    Dec 2003
    Posts
    28

    debug symbols?

    How can i add debug symbols so i can see whats going on better.
    BTW i'm on devc++4 .
    GDB debuger.
    Thanks alot

    Code:
    //recursive factorial function
    #include <iostream>
    #include <iomanip>
    using namespace std;
    
    unsigned long factorial( unsigned long );
    
    int main()
    {
       for (int i = 1; i <= 10; i++ )
          cout << setw( 2 ) << i << "! = " << factorial( i ) << endl;
    
       return 0;
    }
    
    // recursive definition of function factorial
    unsigned long factorial( unsigned long number )
    {
       if ( number <= 1 )   // base case
          return 1;
       else                 // recursive case
          return number * factorial( number -1 );
    }

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,592
    If you select a "debug" build, then you get debug information automatically
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 7
    Last Post: 02-02-2009, 06:27 AM
  2. Trouble with Windows/DirectX programming
    By bobbelPoP in forum Windows Programming
    Replies: 16
    Last Post: 07-08-2008, 02:27 AM
  3. makefiles - debug & release?
    By cpjust in forum C Programming
    Replies: 6
    Last Post: 10-26-2007, 04:00 PM
  4. Results in Debug and Release mode are different
    By jaro in forum C Programming
    Replies: 11
    Last Post: 05-27-2006, 11:08 AM
  5. Strange error?
    By MrLucky in forum C++ Programming
    Replies: 5
    Last Post: 02-04-2006, 02:01 PM

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