gdb

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • moongeegee

    gdb



    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_err or'
    what(): empty rule

  • red floyd

    #2
    Re: gdb

    moongeegee 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_err or'
    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.

    Comment

    • Paavo Helde

      #3
      Re: gdb

      moongeegee <moongeegee@gma il.comwrote in news:e52e669f-3801-4e66-9b1a-
      6b0722017af7@m3 g2000hsc.google groups.com:
      >
      >
      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_err or'
      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

      Comment

      • =?UTF-8?B?RXJpayBXaWtzdHLDtm0=?=

        #4
        Re: gdb

        On 2008-03-18 20:12, moongeegee 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.
        Google for "gdb tutorial" and select any of the first hits, RMS's is
        quite good.

        --
        Erik Wikström

        Comment

        • Victor Bazarov

          #5
          Re: gdb

          moongeegee 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_err or'
          what(): empty rule
          <shrug You're asking a tool question in a language newsgroup. You
          are off-topic. Try gnu.tools.help.

          V
          --
          Please remove capital 'A's when replying by e-mail
          I do not respond to top-posted replies, please don't ask


          Comment

          Working...