gdb

M

moongeegee

I am learning gdb to debug the program. As soon as I run the program,
it prompt me an error and terminated.
How to step into it or set breakpoint and find the problem. Thanks.

(gdb) run
Starting program: /usr/home/grp/gramtest < inputdata
terminate called after throwing an instance of 'std::logic_error'
what(): empty rule
 
V

Victor Bazarov

moongeegee said:
I am learning gdb to debug the program. As soon as I run the program,
it prompt me an error and terminated.
How to step into it or set breakpoint and find the problem. Thanks.

(gdb) run
Starting program: /usr/home/grp/gramtest < inputdata
terminate called after throwing an instance of 'std::logic_error'
what(): empty rule

<shrug> You're asking a tool question in a language newsgroup. You
are off-topic. Try gnu.tools.help.

V
 
R

red floyd

moongeegee said:
I am learning gdb to debug the program. As soon as I run the program,
it prompt me an error and terminated.
How to step into it or set breakpoint and find the problem. Thanks.

(gdb) run
Starting program: /usr/home/grp/gramtest < inputdata
terminate called after throwing an instance of 'std::logic_error'
what(): empty rule

Wrong group. Try gnu.g++.help.

This group is for the discussion of the C++ language as defined by
ISO/IEC 14882:2003. How to use your specific toolset is offtopic.
 
P

Paavo Helde

I am learning gdb to debug the program. As soon as I run the program,
it prompt me an error and terminated.
How to step into it or set breakpoint and find the problem. Thanks.

(gdb) run
Starting program: /usr/home/grp/gramtest < inputdata
terminate called after throwing an instance of 'std::logic_error'
what(): empty rule

gdb is off-topic here, you should try some gcc group or read gdb manual.
There are also graphic front-ends for gdb which ought to be easier to use.

I just mention how to put a breakpoint on exception throwing in gdb as this
is really obscure: b __cxa_throw

regards
Paavo
 
E

Erik Wikström

I am learning gdb to debug the program. As soon as I run the program,
it prompt me an error and terminated.
How to step into it or set breakpoint and find the problem. Thanks.

Google for "gdb tutorial" and select any of the first hits, RMS's is
quite good.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,058
Latest member
QQXCharlot

Latest Threads

Top