* finally getting gdb to work?
@ 2010-07-22 8:04 Andrea Crotti
2010-07-22 10:41 ` Michael Albinus
0 siblings, 1 reply; 7+ messages in thread
From: Andrea Crotti @ 2010-07-22 8:04 UTC (permalink / raw)
To: help-gnu-emacs
I don't understand what happens here, yesterday for the first time I saw
how I should be supposed to debug in emacs (with gdb).
It was great, jumping, easily set breakpoints and so on.
By default this "gdb-many-windows" is nil and until I didn't set it to
"t" I thought that text-mode stuff was all I was getting.
After some other time and trying also out pdb then nothing works
anymore!
When I run
M-x gdb test
I don't anymore the windows set, and if I call gdb-restore-windows I
don't get a working debug environment anyway (only the windows set).
Here is my very simple conf
--8<---------------cut here---------------start------------->8---
#+begin_src emacs-lisp :tangle yes
(setq gdb-show-main nil)
(setq gdb-many-windows t)
#+end_src
*** Some advices for pdb
#+begin_src emacs-lisp :tangle yes
(defadvice pdb (before gud-query-cmdline activate)
"Provide a better default command line when called interactively."
(interactive
(list (gud-query-cmdline 'pdb.py
(file-name-nondirectory buffer-file-name)))))
#+end_src
--8<---------------cut here---------------end--------------->8---
Anyone has an idea?
Ah another thing, I also have to debug some code which compiles only on
a virtual machine, which I can access via ssh.
Now I work on it via sshfs, but I would like to debug it directly.
Is there some way to automate the debugging process from another
machine (with gdbserver or tramp maybe?)?
Thanks a lot
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: finally getting gdb to work?
2010-07-22 8:04 finally getting gdb to work? Andrea Crotti
@ 2010-07-22 10:41 ` Michael Albinus
2010-07-22 11:12 ` Andrea Crotti
0 siblings, 1 reply; 7+ messages in thread
From: Michael Albinus @ 2010-07-22 10:41 UTC (permalink / raw)
To: Andrea Crotti; +Cc: help-gnu-emacs
Andrea Crotti <andrea.crotti.0@gmail.com> writes:
> Ah another thing, I also have to debug some code which compiles only on
> a virtual machine, which I can access via ssh.
>
> Now I work on it via sshfs, but I would like to debug it directly.
> Is there some way to automate the debugging process from another
> machine (with gdbserver or tramp maybe?)?
It should run with Emacs 23.1 + Tramp. See
<http://www.gnu.org/software/tramp/#Remote-processes>.
Unfortunately, this is broken in Emacs 23.2, because the package
gdb-mi.el needs pty support, which is not possible with Tramp (yet).
> Thanks a lot
Best regards, Michael.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: finally getting gdb to work?
2010-07-22 10:41 ` Michael Albinus
@ 2010-07-22 11:12 ` Andrea Crotti
2010-07-22 11:20 ` Andrea Crotti
2010-07-22 11:49 ` Michael Albinus
0 siblings, 2 replies; 7+ messages in thread
From: Andrea Crotti @ 2010-07-22 11:12 UTC (permalink / raw)
To: help-gnu-emacs
>
> It should run with Emacs 23.1 + Tramp. See
> <http://www.gnu.org/software/tramp/#Remote-processes>.
>
> Unfortunately, this is broken in Emacs 23.2, because the package
> gdb-mi.el needs pty support, which is not possible with Tramp (yet).
>
Amazing, it works like a charm!
Now I get back all the windows set up correctly by the way, I don't
understand why sometime it doesn't work...
To me it works also on emacs 23.2 anyway, with
GNU Emacs 23.2.1 (x86_64-apple-darwin10.3.0, NS apple-appkit-1038.29) of
2010-05-09 on linc
and tramp:
2.1.18-23.2
It would also be nice some kind of autodiscovery of what to debug (well
I can also use the history), but maybe if I put some file with some data
in some directories it's looked up automatically...
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: finally getting gdb to work?
2010-07-22 11:12 ` Andrea Crotti
@ 2010-07-22 11:20 ` Andrea Crotti
2010-07-22 12:01 ` Bastian Beischer
2010-07-22 11:49 ` Michael Albinus
1 sibling, 1 reply; 7+ messages in thread
From: Andrea Crotti @ 2010-07-22 11:20 UTC (permalink / raw)
To: help-gnu-emacs
I think I was doing a stupid mistake, just forgetting the --annotate.
Which I don't understand what it does by the way, because it's not in
the manual of gdb but apparently does something...
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: finally getting gdb to work?
2010-07-22 11:12 ` Andrea Crotti
2010-07-22 11:20 ` Andrea Crotti
@ 2010-07-22 11:49 ` Michael Albinus
2010-07-22 11:58 ` Andrea Crotti
1 sibling, 1 reply; 7+ messages in thread
From: Michael Albinus @ 2010-07-22 11:49 UTC (permalink / raw)
To: Andrea Crotti; +Cc: help-gnu-emacs
Andrea Crotti <andrea.crotti.0@gmail.com> writes:
> To me it works also on emacs 23.2 anyway, with
> GNU Emacs 23.2.1 (x86_64-apple-darwin10.3.0, NS apple-appkit-1038.29) of
> 2010-05-09 on linc
> and tramp:
> 2.1.18-23.2
I stay corrected. gdb-mi.el was introduced with Emacs 24.0.50.
Best regards, Michael.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: finally getting gdb to work?
2010-07-22 11:49 ` Michael Albinus
@ 2010-07-22 11:58 ` Andrea Crotti
0 siblings, 0 replies; 7+ messages in thread
From: Andrea Crotti @ 2010-07-22 11:58 UTC (permalink / raw)
To: help-gnu-emacs
Michael Albinus <michael.albinus@gmx.de> writes:
>
> I stay corrected. gdb-mi.el was introduced with Emacs 24.0.50.
>
> Best regards, Michael.
Ah right I understood that the remote thing was not working...
gdb-mi is pretty cool, but for now also the normal gdb is great
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: finally getting gdb to work?
2010-07-22 11:20 ` Andrea Crotti
@ 2010-07-22 12:01 ` Bastian Beischer
0 siblings, 0 replies; 7+ messages in thread
From: Bastian Beischer @ 2010-07-22 12:01 UTC (permalink / raw)
To: Andrea Crotti; +Cc: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 1095 bytes --]
From the info pages of GDB:
`-annotate LEVEL'
This option sets the "annotation level" inside GDB. Its effect is
identical to using `set annotate LEVEL' (*note Annotations::).
The annotation LEVEL controls how much information GDB prints
together with its prompt, values of expressions, source lines, and
other types of output. Level 0 is the normal, level 1 is for use
when GDB is run as a subprocess of GNU Emacs, level 3 is the
maximum annotation suitable for programs that control GDB, and
level 2 has been deprecated.
The annotation mechanism has largely been superseded by GDB/MI
(*note GDB/MI::).
On Thu, Jul 22, 2010 at 1:20 PM, Andrea Crotti <andrea.crotti.0@gmail.com>wrote:
>
> I think I was doing a stupid mistake, just forgetting the --annotate.
> Which I don't understand what it does by the way, because it's not in
> the manual of gdb but apparently does something...
>
>
>
--
Bastian Beischer
I. Physikalisches Institut B (RWTH Aachen)
Sommerfeldstr. 14
52074 Aachen
GERMANY
Office: 28-C-203
Phone: +49 241 - 8027205
[-- Attachment #2: Type: text/html, Size: 1602 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2010-07-22 12:01 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-22 8:04 finally getting gdb to work? Andrea Crotti
2010-07-22 10:41 ` Michael Albinus
2010-07-22 11:12 ` Andrea Crotti
2010-07-22 11:20 ` Andrea Crotti
2010-07-22 12:01 ` Bastian Beischer
2010-07-22 11:49 ` Michael Albinus
2010-07-22 11:58 ` Andrea Crotti
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).