please help a gdb newbie

i have these lines of code and want them to be debugged via gdb:

#include <stdlib.h>
#include <stdio.h>

int main(int argc, char *argv[]) {
printf(“Welcome to the Momentics IDE\n”);
return EXIT_SUCCESS;
}

here’s my gdb session:

bash-2.05a# gdb bla_g
GNU gdb 5.2.1qnx-326 QNX Neutrino 6.2.1
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type “show copying” to see the conditions.
There is absolutely no warranty for GDB. Type “show warranty” for details.
This GDB was configured as “ntox86”…
(gdb) b main
Breakpoint 1 at 0x80483ea: file /root/workspace/bla/bla.c, line 5.
(gdb) run
Starting program: /root/workspace/bla/x86/o-g/bla_g
(gdb) n
Cannot find bounds of current function
(gdb) bt
#0 0xb032d87d in ?? ()
(gdb)

why gdb doesn’t stop at the defined breakpoint? what’s wrong? (on other platforms all this works as expected)

thanks!

I have also noticed this problem. The workaround, I have found and have been following, is after giving ‘run’ command, give ‘c’ command and it breaks at the first breakpoint. After this you can start using ‘n’.

-Vish.

We do a two step startup - run and then continue.