[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#3650: M-x gdb unusable on Windows

From: Dan Nicolaescu
Subject: bug#3650: M-x gdb unusable on Windows
Date: Tue, 23 Jun 2009 10:08:07 -0700 (PDT)

Kenichi Handa <address@hidden> writes:

  > In article <address@hidden>, address@hidden (Nick Roberts) writes:
  > > >> By the way, I also installed gdb-6.8-mingw-3.tar.bz2.  But,
  > > >> with "M-x gdb", pp and pr commands doesn't work.  They print
  > > >> nothing.  They do work when gdb is invoked from command
  > > >> line.  Do you know what is wrong?
  > > Are you sure they print nothing or is it just that the output isn't
  > > being flushed?  The commentary in gdb-ui.el has some advice about using
  > > Emacs and GDB on Windows:
  > >   ;; If you are using Emacs and GDB on Windows you will need to flush the 
  > >   ;; explicitly in your program if you want timely display of I/O in 
  > >   ;; Alternatively you can make the output stream unbuffered, for 
example, by
  > >   ;; using a macro:
  > >   ;;           #ifdef UNBUFFERED
  > >   ;;           setvbuf (stdout, (char *) NULL, _IONBF, 0);
  > >   ;;           #endif
  > >   ;; and compiling with -DUNBUFFERED while debugging.
  > Thank you for the info.  When I added "fflush (stderr);" at
  > the end of the function debug_print, pp and pr commands
  > started to work on Windows (mingw).
  > But, still C-c C-n in *gud* buffer, C-x C-a C-b in a source
  > file buffer don't work.
  > When I type C-c C-n in *gud* buffer,
  >   "error in process filter: Unexpected `starting' annocation"
  > is shown in the echo area, and no command is accepted here
  > after.

I hit this regularly when running gdb against a simulator (i.e. slow
response from the target) and type
c RET c RET 
fast, so the second c comes before hitting the next breakpoint.  It
seems that gud gets confused in interpreting the response from gdb...

After that anything I type print the result of "info breakpoints".

  > When I type C-x C-a C-b in a source file buffer, the gdb
  > prompt in *gud* buffer is erased, and any further commands
  > in *gud* just show the same output as "br info", and the
  > menu bar keep flushing.

Sometimes typing
quit RET
and then answering "no" will clear things up and it's possible to
continue... but this is just a hack...

reply via email to

[Prev in Thread] Current Thread [Next in Thread]