News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Newbie has two problems

Started by Paul C. Anagnostopoulos, September 01, 2008, 03:14:58 AM

Previous topic - Next topic

Paul C. Anagnostopoulos

Folks,

I've just installed Code::Blocks 8.02 and I'm quite enjoying it. I have two problems that searching here did not solve.

1. I build and run my little console program with F9. The console comes up and the output looks fine. Then I change one character in the output and press F9 again. I still see the original text. Then I press F9 a second time and I see the new text. Doing a Save or Save All after the text change does not help. Doing a separate Build and then Run after the text change does not help either. I must have a misunderstanding about when Build decides to recompile files.

2. I press F8 to run the debugger (GDB). The debugger log displays:

Building to ensure sources are up-to-date
Build succeeded
Selecting target:
Release
Adding source dir: C:\Freefall\Freefall\
Adding source dir: C:\Freefall\
Adding file: bin\Release\Freefall.exe
Starting debugger:
done
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
(no debugging symbols found)
Debugger name and version: GNU gdb 6.7.50.20071127
Child process PID: 34808
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
Program exited normally.
Debugger finished with status 0

Then the console flashes the output and terminates. No interactive debugger starts up. Using Step Into does the same thing.

I have the -g compiler flag checked, so I don't understand "no debugging symbols found."

Any help would be appreciated.

~~ Paul

Jenna

Quote from: Paul C. Anagnostopoulos on September 01, 2008, 03:14:58 AM
I have the -g compiler flag checked, so I don't understand "no debugging symbols found."

Did you change your build target to debug (dropdown-list in the compiler toolbar).

MortenMacFly

Quote from: Paul C. Anagnostopoulos on September 01, 2008, 03:14:58 AM
I have the -g compiler flag checked, so I don't understand "no debugging symbols found."
Notice: When you change compiler options like that you need to rebuild your complete project (target) to work.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

Paul C. Anagnostopoulos

Quote from: jens on September 01, 2008, 08:12:23 AM
Quote from: Paul C. Anagnostopoulos on September 01, 2008, 03:14:58 AM
I have the -g compiler flag checked, so I don't understand "no debugging symbols found."

Did you change your build target to debug (dropdown-list in the compiler toolbar).
I have only a Release target.


~~ Paul

Paul C. Anagnostopoulos

Quote from: MortenMacFly on September 01, 2008, 01:21:00 PM
Quote from: Paul C. Anagnostopoulos on September 01, 2008, 03:14:58 AM
I have the -g compiler flag checked, so I don't understand "no debugging symbols found."
Notice: When you change compiler options like that you need to rebuild your complete project (target) to work.
I've rebuilt it numerous times. All my original issues remain.

~~ Paul

Paul C. Anagnostopoulos

Okay, one problem solved. There were no debugging symbols because the project options included -g, but the build options included -s. I didn't even know there was hierarchy of options, so I'm not sure how I checked -s in the build options.

Once there are symbols, then the debugger is willing to do its thing.

~~ Paul