all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Running gdb in emacs.
@ 2020-01-16  9:27 aprekates
  2020-01-16 15:09 ` Eli Zaretskii
  0 siblings, 1 reply; 3+ messages in thread
From: aprekates @ 2020-01-16  9:27 UTC (permalink / raw)
  To: Help Gnu Emacs mailing list

Hi.

I found those two basic ways to start gdb in emacs:

1.  M-x gdb

2.  M-x gud-gdb

In the first case i pass the  --interpreter=mi option to enable the 
gdb-mi and i can use various other windows like stackframes, registers , 
output etc.

In the second case i have only the source and a gdb window in user 
interface. If i give  --interpreter=mi after M-x gud-gdb i get only a 
gdb windows which seems to work in machine mode.

So i dont understand what is the proposed use case of using M-x gud-gdb 
since it seems it offers a basic debugging enviroment.

Also M-x gdb does it use GUD?

Alexandros




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Running gdb in emacs.
  2020-01-16  9:27 Running gdb in emacs aprekates
@ 2020-01-16 15:09 ` Eli Zaretskii
       [not found]   ` <mailman.2731.1579187331.1979.help-gnu-emacs@gnu.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Eli Zaretskii @ 2020-01-16 15:09 UTC (permalink / raw)
  To: help-gnu-emacs

> From: aprekates <aprekates@posteo.net>
> Date: Thu, 16 Jan 2020 11:27:03 +0200
> 
> I found those two basic ways to start gdb in emacs:
> 
> 1.  M-x gdb
> 
> 2.  M-x gud-gdb
> 
> In the first case i pass the  --interpreter=mi option to enable the 
> gdb-mi and i can use various other windows like stackframes, registers , 
> output etc.
> 
> In the second case i have only the source and a gdb window in user 
> interface. If i give  --interpreter=mi after M-x gud-gdb i get only a 
> gdb windows which seems to work in machine mode.
> 
> So i dont understand what is the proposed use case of using M-x gud-gdb 
> since it seems it offers a basic debugging enviroment.

"M-x gud-gdb" is the old way of running GDB under Emacs.  It relies on
a GDB feature, called "annotations", which is deprecated by the GDB
developers, and could be removed from GDB at any moment.

"M-x gdb" with all its features was written to be the main method of
running GDB from Emacs.  We suggest that you use only "M-x gdb",
unless you have a very good reason, like some version of GDB that
doesn't support the mi interface well.

> Also M-x gdb does it use GUD?

I don't think I understand what you are asking.  Please elaborate.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Running gdb in emacs.
       [not found]   ` <mailman.2731.1579187331.1979.help-gnu-emacs@gnu.org>
@ 2020-01-17  9:12     ` Madhu
  0 siblings, 0 replies; 3+ messages in thread
From: Madhu @ 2020-01-17  9:12 UTC (permalink / raw)
  To: help-gnu-emacs

* Eli Zaretskii <mailman.2731.1579187331.1979.help-gnu-emacs@gnu.org> :
Wrote on Thu, 16 Jan 2020 17:09:03 +0200:

> "M-x gud-gdb" is the old way of running GDB under Emacs.  It relies on
> a GDB feature, called "annotations", which is deprecated by the GDB
> developers, and could be removed from GDB at any moment.
>
> "M-x gdb" with all its features was written to be the main method of
> running GDB from Emacs.  We suggest that you use only "M-x gdb",
> unless you have a very good reason, like some version of GDB that
> doesn't support the mi interface well.

I know you've given me advice before and I did try gdb-mi again, but it
I fint it is still unusable.  I can think of two reasons:

1. I am limited to using 80column frames and the windows that gdb-mi are
too small and their content cannot be viewed without too navigating
through too many keystrokes - repeated at every `step'

2. I prefer to use display-buffer-reuse-window when possible for
display-buffer.  When stepping through functions which are spread out in
different files I need to have all the files open at specific points
(i'm trying to understand the code).  Every `step' alters the window
configuration that I expect and I spend more time in getting back to
where I was before invoking the gdb action, than actually debugging.

On the other hand gud-gdb is more managable.  With annotations it also
pops to the buffer with the annotated source line (when available) but
the overall disruption is much less.



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-01-17  9:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-16  9:27 Running gdb in emacs aprekates
2020-01-16 15:09 ` Eli Zaretskii
     [not found]   ` <mailman.2731.1579187331.1979.help-gnu-emacs@gnu.org>
2020-01-17  9:12     ` Madhu

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.