GDB debugger problem

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

    GDB debugger problem

    hello everyone,
    i was debugging a simple program using gdb debugger and when in
    function display
    on the simple line
    cout<<"this is the out put";
    .........
    ........
    ......
    there was no output from the program and the gdb promp(gdb>)
    also disappered from here on and after sometime it showed something
    like
    "the program recived signal SIGINT" or something like that
    and also while running the program this few lines were not displayed
    (im using fedora core 8 and was on g++ on command line)
    can anyone please tell what was wrong with that.

    mohan
  • Victor Bazarov

    #2
    Re: GDB debugger problem

    mohi wrote:
    i was debugging a simple program using gdb debugger and when in
    function display
    on the simple line
    cout<<"this is the out put";
    ........
    .......
    .....
    there was no output from the program and the gdb promp(gdb>)
    also disappered from here on and after sometime it showed something
    like
    "the program recived signal SIGINT" or something like that
    and also while running the program this few lines were not displayed
    (im using fedora core 8 and was on g++ on command line)
    can anyone please tell what was wrong with that.
    Whatever is wrong with that, it has nothing to do with C++ language.
    Consider asking in an appropriate gnu.* newsgroup or the newsgroup
    for your platform.

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


    Comment

    • Christopher

      #3
      Re: GDB debugger problem

      On Apr 1, 9:45 am, mohi <mohangupt...@g mail.comwrote:
      hello everyone,
      i was debugging a simple program using gdb debugger and when in
      function display
      on the simple line
      cout<<"this is the out put";
      ........
      .......
      .....
      there was no output from the program and the gdb promp(gdb>)
      also disappered from here on and after sometime it showed something
      like
      "the program recived signal SIGINT" or something like that
      and also while running the program this few lines were not displayed
      (im using fedora core 8 and was on g++ on command line)
      can anyone please tell what was wrong with that.
      >
      mohan
      Show more source. You have a segmentation fault in your code.

      Comment

      • James Kanze

        #4
        Re: GDB debugger problem

        On Apr 1, 4:55 pm, "Victor Bazarov" <v.Abaza...@com Acast.netwrote:
        mohi wrote:
        i was debugging a simple program using gdb debugger and when in
        function display
        on the simple line
        cout<<"this is the out put";
        ........
        .......
        .....
        there was no output from the program and the gdb promp(gdb>)
        also disappered from here on and after sometime it showed
        something like
        "the program recived signal SIGINT" or something like that
        and also while running the program this few lines were not displayed
        (im using fedora core 8 and was on g++ on command line)
        can anyone please tell what was wrong with that.
        Whatever is wrong with that, it has nothing to do with C++ language.
        The fact that nothing was displayed probably does. At the very
        least, his output isn't significant without a flush.
        Consider asking in an appropriate gnu.* newsgroup or the
        newsgroup for your platform.
        While that's true too, I doubt that he'll get much help anywhere
        with such a vague description.

        FWIW: under Unix, SIGINT is normally what the program gets when
        you enter control-C. Program errors more often result in
        SIGSEGV or SIGBUS, or maybe SIGILL, SIGFPE or SIGSYS. But of
        course, given an error wierd enough, just about anything can
        happen.

        --
        James Kanze (GABI Software) email:james.kan ze@gmail.com
        Conseils en informatique orientée objet/
        Beratung in objektorientier ter Datenverarbeitu ng
        9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34

        Comment

        • James Kanze

          #5
          Re: GDB debugger problem

          On Apr 1, 4:57 pm, Christopher <cp...@austin.r r.comwrote:
          On Apr 1, 9:45 am, mohi <mohangupt...@g mail.comwrote:
          hello everyone,
          i was debugging a simple program using gdb debugger and when in
          function display
          on the simple line
          cout<<"this is the out put";
          ........
          .......
          .....
          there was no output from the program and the gdb promp(gdb>)
          also disappered from here on and after sometime it showed something
          like
          "the program recived signal SIGINT" or something like that
          and also while running the program this few lines were not displayed
          (im using fedora core 8 and was on g++ on command line)
          can anyone please tell what was wrong with that.
          Show more source. You have a segmentation fault in your code.
          That would be SIGSEGV. Normally, SIGINT is generated by
          control-C on the keyboard.

          Since the poster didn't indicate what gdb commands he'd used
          (not that that would be on topic here), it's impossible to say
          what might be happening. One thing is clear, however: he didn't
          ask for any output from the program, so it's not surprising that
          he didn't get any. And of course, the gdb prompt only appears
          when the program has stopped for some reason; if the program is
          executing, gdb doesn't output a prompt.

          --
          James Kanze (GABI Software) email:james.kan ze@gmail.com
          Conseils en informatique orientée objet/
          Beratung in objektorientier ter Datenverarbeitu ng
          9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34

          Comment

          Working...