User forums > Help
Break points
johne53:
--- Quote from: qed on April 28, 2007, 12:00:03 pm ---type gdb --version
--- End quote ---
Thanks qed - in that case, I'm running GDB version 6.5
--- Quote from: qed on April 28, 2007, 12:00:03 pm ---also i've noticed that if i reload the file at a later date the breakpoints haven't been saved.
--- End quote ---
Ah - a kindred spirit. I get the same problem.... I save the project then reload it sometime later and all my break points are gone...!
Please is there anyone who can confirm that this should in fact be working...?
TDragon:
--- Quote from: johne53 on April 28, 2007, 07:39:49 am ---If I de-select -g whilst my 'Release' target is selected, it also gets de-selected for the 'Debug' target...
--- End quote ---
Changing your targets' build options has nothing to do with which target is selected to be built, or selected in the drop-down list on the toolbar, and everything to do with which target is selected in the tree on the left in the actual build options dialog.
johne53:
Thanks TDragon - in that case, -g is selected for my Debug build and -s is selected for my Release build (with no other options selected). Does this make it any clearer why the break points don't seem to be working? Or could it maybe be a problem with optimizations?
[Edit...] Ah - a breakthrough! If I change the code to this:-
--- Code: ---#include <stdio.h>
int main()
{
printf("Hello World");
printf("Hello Earth");
printf("Hello Venus");
return (0);
}
--- End code ---
I can place a break point on any line after the first printf() line and it will work!! The only problem is that I can't continue execution by using CTRL+F7. Strangely though, if I select Debug->Continue (which is theoretically the same thing) that does work ?!? It's a step forward but I'm still baffled.
Oh, and I still lose the breakpoints if I save and reload the project (or workspace).
qed:
heh amazing yeah hello venus hello earth is the key 8).. seriously though mine does exactly the same thing with the two extra printf's.. i.e. i don't get the no symbol file please use file option.. i don't get any arrows though so i know where the trace is.. continue exhibits the same behaviour and i get no console output.. but exit code zero..
for the record and just to see if there is any thread in this i'm running gcc version 3.4.4 gdb 6.5.5 both under cygwin and xp pro sp2 on a centrino laptop.. also have visual studio 6.0 ..full directx 9 dev kit ..any similarities?? areas of common :?interest??
qed:
hi there.. i was thinking it might be a good idea that your gdb environment works properly at all.. under the cli run your 'hello world' program that you compiled with the -g option.. mine is called test.. do..
gdb test .. runs test executable
break 5 .. set breakpoint at line 5
run .. should run to line 5
continue .. run until end.. does printf's
quit .. exit gdb
if all that works it points the finger at codeblocks .. not gcc/gdb imo
hth
keep the faith.. we'' figure it out in the end!
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version