gdb problem

Hello everyone,

I have QNX 6.2.0 installed. I’m trying to use gdb, but It doesn’t work at all. Example:

$ gcc -g xmpl.c -o xmpl
$ gdb xmpl
GNU gdb 5.0 (UI_OUT)
Copyright 2000 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 “–host=x86-pc-nto-qnx --target=ntox86”…
(gdb) l
1 #include <stdio.h>
2 #include <stdlib.h>
3
4 int main (int argc, char **argv)
5 {
6 int j;
7 j=argc+1;
8 printf("%d, %d\n",argc,j);
9 puts(argv[0]);
10 }(gdb) b 8
Breakpoint 1 at 0x8048421: file xmpl.c, line 8.
(gdb) run hello
Starting program: /home/grillo/varias/xmpl hello
(gdb) print argc
No symbol “argc” in current context.
(gdb)

Why doen’t it stop at the breakpoint? What can I do? Is there any other gbd version for QNX? (I tried to install gbd 6.3, but i couldn’t).

Thank you.

The QNX version of gdb doesn’t actually continue the program - use the ‘continue’ command

I’ve used it. And it does work. Thank you! :- >>