help-gnu-emacs
[Top][All Lists]
Advanced

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

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


From: Francis Moreau
Subject: Re: gud : Phase error in gdb-pre-prompt (got pre-emacs)
Date: Tue, 1 Jul 2008 16:07:20 +0200

Hello,

On Tue, Jul 1, 2008 at 12:15 AM, Nick Roberts <nickrob@snap.net.nz> wrote:
>  > Here it is:
>  >
>  > gdb-debug-log is a variable defined in `gdb-ui.el'.
>  > Its value is
>  > ((recv . "\n^Z^Zpre-prompt\n(gdb) \n^Z^Zprompt\n")
>  >  (recv . 
> "\n^Z^Zpost-prompt\n^done,frame={level=\"0\",addr=\"0x84002000\",func=\"_stext\"}\n(gdb)
>  > \n")
>  >  (send-item "server interpreter mi -stack-info-frame\n" gdb-get-version))
>
>
> 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...

> 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 in
> your case.

Note that I can't issue any command when emacs is in this state.
They just get stuck.

> What are the values of the variables
>
> gdb-input-queue
> gdb-pending triggers
> gdb-ready
> gud-runnning
>
> at this point?
>

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))


gdb-pending-triggers is a variable defined in `gdb-ui.el'.
Its value is nil

gdb-ready is a variable defined in `gud.el'.
Its value is nil

gud-running is a variable defined in `gud.el'.
Its value is 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...

>
> 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 ?

But I can add 2 more info about this issue:

First, starting gdb from a shell works fine.

Second point is emacs 21 used to work.

Thanks
-- 
Francis




reply via email to

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