gdb not working correctly in QNX 6.3

Given the following VERY simple program (hello.c):

#include <stdio.h>
int main(int argc,char*argv[])
puts(“Hello, world”);

I compile with the following:

% QCC -V3.3.1,gcc_ntox86 -g hello.c

I then invoke gdb with:

% gdb a.out

and have the following gdb dialogue:

(gdb) break 4
Breakpoint 1 at 0x80483e2: file hello.c, line 4.
(gdb) run
Starting program: /home/ed/a.out
(gdb) step
Cannot find bounds of current function

I’ve tried this with multiple different programs,
tried compiling with both “-g” and “-ggdb”, and I can never get past that “Cannot find bounds…” thing. I’ve never seen gdb do this before.

Anyone have an idea what’s going wrong?

Many thanks!


I usually place a break point on main(), then 'cont’inue right after I ‘run’, until I break at main().

See if that helps,


The QNX GDB requires you type start after you type run.