[Top][All Lists]

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

Re: Emacs fails parsing gdb output

From: Nick Roberts
Subject: Re: Emacs fails parsing gdb output
Date: Fri, 13 Jul 2007 11:08:51 +1200

> I'm attaching a new debug log where I've gone one step further and
> done "f" in the GDB pane to get the source window to refresh.  That
> did get me a bunch of error messages which might make this log a bit
> more interesting to you.

It still doesn't seem to contain the errors but I don't think they can be
avoided without deffering execution or using M-x gdba anyway.

> > What happens if you start your application under GDB without the GDB
> > scripts?

> The reason we have the scripts is that what we're debugging is a
> library (libjvm.so), and the scripts run load and run things long
> enough for us to get into our library.  If we don't run the scripts,
> nothing will even get loaded into gdb.

I see, but presumably you can do this after M-x gdb has started up:

  M-x gdb
  Run gdb (like this): gdb -annotate=3 myprog

In GUD buffer:

  Current directory is /home/nickrob/
  GNU gdb 6.6-debian
  (gdb) source myscript

but, in any case, M-x gdba is probably more convenient.

> > I think that M-x gdb doesn't work in you start execution from within a
> > script.  In this case you must use M-x gdba.  Does this work?

> Yes!  What's the difference betweeen gdb and gdba?  I wasn't able to
> find anything documenting the difference, according to the docs they
> seem to do roughly the same thing.

M-x gdba assumes that GDB is being run with the "--annotate=3" option.  M-x gdb
filters the output to determine whether GDB is being run with "--fullname" or
"--annotate=3".  The former gives the old Emacs 21 functionality (or lack of
it!) and is worth using if all else fails.

So they do indeed do the same thing, in most cases, when "--annotate=3" is
used (the default).  There is a problem when GDB commands like "run" are
included in GDB scripts because these get run _before_ GDB commands that Emacs
uses to set up the mode.  Perhaps I'll add a note in the manual.

Nick                                           http://www.inet.net.nz/~nickrob

reply via email to

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