[Top][All Lists]

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

Re: gud : Phase error in gdb-pre-prompt (got pre-emacs)

From: Nick Roberts
Subject: Re: gud : Phase error in gdb-pre-prompt (got pre-emacs)
Date: Wed, 2 Jul 2008 10:41:56 +1200

 > > That shows to me that execution has already begun and is in the function
 > > _stext, so "run" wouldn't be an appropriate command to send anyway.
 > Well actually I lied, I don't do 'run' but 'continue' but I've never
 > figured out why...

If you connect to a remote target, it's already running and it stops when you
connect to it.  I presume it's the same for a kernel.

 > > It normally starts (ends) like this:
 > >
 > >  ...
 > >  (recv . "\n^Z^Zpre-prompt\n(gdb) \n^Z^Zprompt\n")
 > >  (recv . "\n^Z^Zpost-prompt\n")
 > >  (send-item "set width 0\n" ignore)
 > >  (recv . "\n^Z^Zpre-prompt\n(gdb) \n^Z^Zprompt\n")
 > >  (recv . "\n^Z^Zpost-prompt\n")
 > >  (send-item "set height 0\n" ignore)
 > >  (recv . "\n^Z^Zpre-prompt\n(gdb) \n^Z^Zprompt\n")
 > >  (recv . "\n^Z^Zpost-prompt\n&\"\\n^Z^Zerror-begin\\n\"\n&\"No 
 > > registers.\\n\"\n~\"\\n\"\n~\"^Z^Zerror\\n\"\n^error,msg=\"No 
 > > registers.\"\n(gdb) \n")
 > >  (send-item "server interpreter mi -stack-info-frame\n" gdb-get-version))
 > >
 > > I understand why Emacs stops sending GDB commands after -stack-info-frame

Sorry, I mean I don't understand

 > ...
 > gdb-input-queue is a variable defined in `gdb-ui.el'.
 > Its value is
 > (("server info source\n" gdb-source-info)
 >  ("server list\n" ignore)
 >  ("server interpreter mi \"-file-list-exec-source-files\"\n"
 > gdb-set-gud-minor-mode-existing-buffers-1)
 >  ("server interpreter mi -data-list-register-names\n" gdb-get-register-names)
 >  ("set width 0\n" ignore)
 >  ("set height 0\n" ignore))

This should be nil.

 > > Isn't the kernel debugged through a remote stub in a patched gdb (kgdb)?
 > Yes probably, I'm using a gdb patched by a third party but don't know and
 > can't figure out what has been patched...

Then the patch may change behaviour in other ways.  I suspect that it's not
issuing some of the prompt annotations.  A distributed patched gdb is covered
by GPL so presumably you have access to the source code.  What version of
gdb is itbased on? and who are the third party?

 > > Also there was a thread "kgdb in emacs" in help-gnu-emacs back in April of
 > > this year.
 > >
 > > If you make prgress with this problem please post a description to the
 > > list (or emacs-devel) so I can add it to the documentation.
 > No problem. Which documentation are you talking about BTW ?

If it's general, I could say something in the manual.  If it's specialised
I could put it in the commentary of gdb-ui.el.

 > But I can add 2 more info about this issue:
 > First, starting gdb from a shell works fine.

I still don't know how you are using gdb.  Presumably it's not running on the
same machine as the kernel that you are debugging.  How do you start
gdb/connect to the kernel from a shell?

 > Second point is emacs 21 used to work.

It's a different mode.  With M-x gdb, if you use "gdb --fullname" instead of
"gdb --annotate=3" with Emacs 22.x it should work as before.  With Emacs 23,
i.e. Emacs in CVS, you have to use M-x gud-gdb


reply via email to

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