gdb

I am trying to learn to use the “gdb” debugger on QNX 6.3. I have a simple
program that prints out a message to the console that i want to debug.

At the gdb prompt, i say
(gdb) break main

to add a breakpoint at the main function and then run the program as follows
(gdb) run

Now , if i type in “step” to step into the function, it says
“cannot find bounds of current function”.

Can somone suggest what this means?

Thanks
Shashank

Did you compile with a “-g” option to gcc?

“Shashank” <sbalijepalli@precitech.com> wrote in message
news:d215ah$7gn$1@inn.qnx.com

I am trying to learn to use the “gdb” debugger on QNX 6.3. I have a simple
program that prints out a message to the console that i want to debug.

At the gdb prompt, i say
(gdb) break main

to add a breakpoint at the main function and then run the program as
follows
(gdb) run

Now , if i type in “step” to step into the function, it says
“cannot find bounds of current function”.

Can somone suggest what this means?

Thanks
Shashank


\

Yes, I compiled with the “-g” option.

Shashank



“Dean Douthat” <deanz1@comcast.net> wrote in message
news:d218l4$9qu$1@inn.qnx.com

Did you compile with a “-g” option to gcc?

“Shashank” <> sbalijepalli@precitech.com> > wrote in message
news:d215ah$7gn$> 1@inn.qnx.com> …
I am trying to learn to use the “gdb” debugger on QNX 6.3. I have a
simple
program that prints out a message to the console that i want to debug.

At the gdb prompt, i say
(gdb) break main

to add a breakpoint at the main function and then run the program as
follows
(gdb) run

Now , if i type in “step” to step into the function, it says
“cannot find bounds of current function”.

Can somone suggest what this means?

Thanks
Shashank




\

Shashank wrote:

Yes, I compiled with the “-g” option.

start with: (yp → name of your program)

exec yp
sym yp
run yp
b main
c

Armin


Shashank



“Dean Douthat” <> deanz1@comcast.net> > wrote in message
news:d218l4$9qu$> 1@inn.qnx.com> …

Did you compile with a “-g” option to gcc?

“Shashank” <> sbalijepalli@precitech.com> > wrote in message
news:d215ah$7gn$> 1@inn.qnx.com> …

I am trying to learn to use the “gdb” debugger on QNX 6.3. I have a

simple

program that prints out a message to the console that i want to debug.

At the gdb prompt, i say
(gdb) break main

to add a breakpoint at the main function and then run the program as

follows

(gdb) run

Now , if i type in “step” to step into the function, it says
“cannot find bounds of current function”.

Can somone suggest what this means?

Thanks
Shashank






\

Armin Steinhoff wrote:

start with: (yp → name of your program)

exec yp
sym yp
run yp
b main
c

For a long time, for some reason, we had launched processes in gdb and
held them at their first instruction. In order to get to your first
breakpoint you would need to continue after running. This is contrary
to the way most gdbs work so I’ve changed it in newer versions. The
‘cannot find bounds’ error is simply because you’re stepping through the
prologue of your program.

cheers,

Kris