Loading ...
Sorry, an error occurred while loading the content.

Annotations missing after detach and enabled once breakpoints

Expand Messages
  • Xavier de Gaye
    I am implementing a GDB interface to Vim (VIM - Vi IMproved) that uses GDB annotations level 2. a) When a breakpoint is enable once , it becomes disabled the
    Message 1 of 1 , Feb 10, 2004
    • 0 Attachment
      I am implementing a GDB interface to Vim (VIM - Vi IMproved) that uses
      GDB annotations level 2.

      a) When a breakpoint is 'enable once', it becomes disabled the next
      time it is hit. GDB does not send a 'breakpoints-invalid' annotation
      in this case to annotate the change (but it rightly does when the
      breakpoint's 'commands' are changed, for example).
      See test case below.

      b) After a detach command, GDB does not send a 'frames-invalid'
      annotation. See test case below.

      =========================================================================
      /* The foobar program */
      main()
      {
      int i;

      for (i = 0; ; i++)
      {
      printf("value %d\n", i);
      usleep(500000); /* 500 msecs */
      }
      }

      =========================================================================
      # Testing for 'breakpoints-invalid' annotation after 'enable once'
      # has been hit
      file foobar
      break foobar.c:8
      break foobar.c:9
      enable once 2
      run

      # Stopped at breakpoint 1
      # continue till stopped at enabled once breakpoint 2
      set annotate 2
      continue
      quit

      =========================================================================
      GNU gdb 5.3
      Copyright 2002 Free Software Foundation, Inc.
      GDB is free software, covered by the GNU General Public License, and you are
      welcome to change it and/or distribute copies of it under certain conditions.
      Type "show copying" to see the conditions.
      There is absolutely no warranty for GDB. Type "show warranty" for details.
      This GDB was configured as "i586-pc-linux-gnu".
      (gdb) (gdb) (gdb) Reading symbols from foobar...done.
      (gdb) Breakpoint 1 at 0x80484a0: file foobar.c, line 8.
      (gdb) Breakpoint 2 at 0x80484b3: file foobar.c, line 9.
      (gdb) (gdb) Starting program: /home/xavier/tmp/foobar

      Breakpoint 1, main () at foobar.c:8
      8 printf("value %d\n", i);
      (gdb) (gdb) (gdb) (gdb)
      ^Z^Zpre-prompt
      (gdb)
      ^Z^Zprompt

      ^Z^Zpost-prompt
      Continuing.

      ^Z^Zstarting

      ^Z^Zframes-invalid

      ^Z^Zframes-invalid

      ^Z^Zbreakpoint 2

      Breakpoint 2,
      ^Z^Zframe-begin 0 0x80484b3

      ^Z^Zframe-function-name
      main
      ^Z^Zframe-args
      ()
      ^Z^Zframe-source-begin
      at
      ^Z^Zframe-source-file
      foobar.c
      ^Z^Zframe-source-file-end
      :
      ^Z^Zframe-source-line
      9
      ^Z^Zframe-source-end


      ^Z^Zsource /home/xavier/tmp/foobar.c:9:101:beg:0x80484b3

      ^Z^Zframe-end

      ^Z^Zstopped

      ^Z^Zpre-prompt
      (gdb)
      ^Z^Zprompt

      ^Z^Zpost-prompt

      ^Z^Zframes-invalid

      =========================================================================
      # Testing for 'frames-invalid' annotation after 'detach'
      file foobar
      attach 1540
      break foobar.c:8
      continue

      # Run comand 'detach' when stopped at breakpoint
      set annotate 2
      detach
      quit

      =========================================================================
      GNU gdb 5.3
      Copyright 2002 Free Software Foundation, Inc.
      GDB is free software, covered by the GNU General Public License, and you are
      welcome to change it and/or distribute copies of it under certain conditions.
      Type "show copying" to see the conditions.
      There is absolutely no warranty for GDB. Type "show warranty" for details.
      This GDB was configured as "i586-pc-linux-gnu".
      (gdb) (gdb) Reading symbols from foobar...done.
      (gdb) Attaching to program: /home/xavier/tmp/foobar, process 1540
      Reading symbols from /lib/libc.so.6...done.
      Loaded symbols for /lib/libc.so.6
      Reading symbols from /lib/ld-linux.so.2...done.
      Loaded symbols for /lib/ld-linux.so.2
      0x400d7581 in nanosleep () from /lib/libc.so.6
      (gdb) Breakpoint 1 at 0x80484a0: file foobar.c, line 8.
      (gdb) Continuing.

      Breakpoint 1, main () at foobar.c:8
      8 printf("value %d\n", i);
      (gdb) Continuing.

      Breakpoint 1, main () at foobar.c:8
      8 printf("value %d\n", i);
      (gdb) (gdb)
      ^Z^Zpre-prompt
      (gdb)
      ^Z^Zprompt

      ^Z^Zpost-prompt
      Detaching from program: /home/xavier/tmp/foobar, process 1540

      ^Z^Zpre-prompt
      (gdb)
      ^Z^Zprompt

      ^Z^Zpost-prompt



      __________________________________________________________________
      New! Unlimited Netscape Internet Service.
      Only $9.95 a month -- Sign up today at http://isp.netscape.com/register
      Act now to get a personalized email address!

      Netscape. Just the Net You Need.
    Your message has been successfully submitted and would be delivered to recipients shortly.