User forums > Help

Break points

(1/3) > >>

johne53:
Hi - I just installed C::B under OpenSuse having already used the Windows version for a couple of days. OpenSuse is what I'll mostly be using and I've set GCC as the default compiler. I wrote a trivial "Hello World" type app in C, like so:-


--- Code: ---#include <stdio.h>

int main()
{
    printf( "Hello World" );

    return 0;
}
--- End code ---

I compiled a Debug build and placed a break point at the printf() line and pressed F8 (which, I'm assuming, is supposed to run the program in the debugger). However, it didn't stop at the break point. What am I doing wrong?

johne53:
Still can't seem to make break points work (presumably they do work, don't they??) Can anyone tell me what I've done wrong? I'm using the standard GDB debugger.

TDragon:

--- Quote from: johne53 on April 27, 2007, 09:53:55 pm ---Can anyone tell me what I've done wrong? I'm using the standard GDB debugger.

--- End quote ---
Is "-g" in the build options? Are you using GDB 6.3 or later?

johne53:
Thanks. The -g option is set but I must admit, I'm rather confused about it. I would have assumed that I should be able to set it for a Debug build but not for a Release build. However, unless I'm missing something, I can't find a way of producing different settings for each target. If I de-select -g whilst my 'Release' target is selected, it also gets de-selected for the 'Debug' target...  :cry:

2) I'm not sure how to find out what version of GDB is installed. I've inspected the properties for the executable but all I can tell is that it's dated 27th November 2006.

qed:
as the 'great'  :shock: michael jackson once sang.. 'you are not alone'..  :P this has been driving me nuts for weeks.. exactly the same thing.. i have currently 6.4 version of gdb running under cygwin although i've tried a couple of others with the same result i never get a symbol file 'use file option'.. duuuhh.. also i've noticed that if i reload the file at a later date the breakpoints haven't been saved.. strange. if anyone can solve this you get 8.5 billion karma air miles .. heh

oh type gdb --version

Navigation

[0] Message Index

[#] Next page

Go to full version