On 18 Mar, 20:47, moongeegee <[EMAIL PROTECTED]> wrote:
> 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

Add a breakpoint with "break filename:linenumber".
Step through the stopped program with n/next or s/step. Also try
typing "help running" at the gdb prompt.

You might also try to use a GUI to gdb (such as DDD, or perhaps Emacs).
_______________________________________________
help-gplusplus mailing list
help-gplusplus@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gplusplus

Reply via email to