all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Debugging Emacs (-nw)
@ 2005-01-16 22:56 Nick Roberts
  2005-01-17  7:08 ` Romain Francoise
  0 siblings, 1 reply; 3+ messages in thread
From: Nick Roberts @ 2005-01-16 22:56 UTC (permalink / raw)


When debugging Emacs while it is running in a terminal (-nw), I have found it
useful to use a separate terminal. In GDB this can be done, for example, in the
following way:

Create two xterms, xterm1 and xterm2 with associated terminals /dev/pts/1
and /dev/pts/2, say.

Type sleep 100000 in xterm2 (so the shell doesn't grab input).
Type "gdb emacs" in xterm1 followed by:
(gdb) tty /dev/pts/2
(gdb) run -nw

and Emacs appears in xterm2 while the gdb session remains in xterm1.

It is even possible to run gdb from within Emacs (from the first xterm or as
a standalone X application) if you set TERM to xterm first:

(gdb) tty /dev/pts/2
(gdb) set environment TERM xterm
(gdb) run -nw

I wonder if its worth mentioning any of this in DEBUG?


Nick

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

* Re: Debugging Emacs (-nw)
  2005-01-16 22:56 Debugging Emacs (-nw) Nick Roberts
@ 2005-01-17  7:08 ` Romain Francoise
  2005-01-17  8:23   ` Nick Roberts
  0 siblings, 1 reply; 3+ messages in thread
From: Romain Francoise @ 2005-01-17  7:08 UTC (permalink / raw)


Nick Roberts <nickrob@snap.net.nz> writes:

> When debugging Emacs while it is running in a terminal (-nw), I have
> found it useful to use a separate terminal.

Indeed, especially if the bug happens to be in the redisplay engine.

> In GDB this can be done, for example, in the following way:

[...]

I usually start Emacs as usual, then attach it from gdb with the
`attach' command.

-- 
Romain Francoise <romain@orebokech.com> | That there, that's not me. I
it's a miracle -- http://orebokech.com/ | go where I please.

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

* Re: Debugging Emacs (-nw)
  2005-01-17  7:08 ` Romain Francoise
@ 2005-01-17  8:23   ` Nick Roberts
  0 siblings, 0 replies; 3+ messages in thread
From: Nick Roberts @ 2005-01-17  8:23 UTC (permalink / raw)
  Cc: emacs-devel

 > > When debugging Emacs while it is running in a terminal (-nw), I have
 > > found it useful to use a separate terminal.
 > 
 > Indeed, especially if the bug happens to be in the redisplay engine.
 > 
 > > In GDB this can be done, for example, in the following way:
 > 
 > [...]
 > 
 > I usually start Emacs as usual, then attach it from gdb with the
 > `attach' command.

Yes, of course. That must be what everyone else does. Perhaps this could be
mentioned in the DEBUG file instead.

Nick

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

end of thread, other threads:[~2005-01-17  8:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-16 22:56 Debugging Emacs (-nw) Nick Roberts
2005-01-17  7:08 ` Romain Francoise
2005-01-17  8:23   ` Nick Roberts

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.