all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How to have a separate I/O window (xterm) with GDB and Emacs?
@ 2004-07-07 16:56 Joachim Nilsson
  0 siblings, 0 replies; 4+ messages in thread
From: Joachim Nilsson @ 2004-07-07 16:56 UTC (permalink / raw)


Hi!

I'm running the latest bleeding edge GNU Emacs from CVS.  I'm
no beginner so I'm not shy for bisarre elisp or C hacks to
solve my current problem.  I'm posting here because I'm really
stuck.

So, if someone could please tell me how I can have a separate
"execution window" a la DDD when using GDB in Emacs I would be
eternally grateful.

It should be possible somehow by spawning say an xterm and
redirect all program I/O using "gdb -tty=device" ...

Why now would I want to do this and *not* use a native Emacs
buffer like everyone else, am I nuts?  No, I have an ncurses
application that I cannot debug inside Emacs because the
output is completely garbled and on top of that it does not
respond to keyboard input either.

I'd like to run the latest (very nice) GDB-UI in Emacs but I'm
stuck with DDD and its separate execution window for now.


Regards
 /Jocke

-- 
Joachim Nilsson :: <joachim AT vmlinux DOT org> 
+46(0)21-123348 :: <http://vmlinux.org/joachim/>

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

* Re: How to have a separate I/O window (xterm) with GDB and Emacs?
       [not found] <mailman.113.1089219563.22971.help-gnu-emacs@gnu.org>
@ 2004-07-07 17:04 ` David Kastrup
  2004-07-07 17:24   ` Joachim Nilsson
  2004-07-08  6:45 ` Matthieu Moy
  1 sibling, 1 reply; 4+ messages in thread
From: David Kastrup @ 2004-07-07 17:04 UTC (permalink / raw)


Joachim Nilsson <joachim.nilsson@vmlinux.org> writes:

> I'm running the latest bleeding edge GNU Emacs from CVS.  I'm
> no beginner so I'm not shy for bisarre elisp or C hacks to
> solve my current problem.  I'm posting here because I'm really
> stuck.
> 
> So, if someone could please tell me how I can have a separate
> "execution window" a la DDD when using GDB in Emacs I would be
> eternally grateful.
> 
> It should be possible somehow by spawning say an xterm and
> redirect all program I/O using "gdb -tty=device" ...

You know that gdb can easily attach to running processes with the
`attach' command?  Or by specifying the process id as a second
command line argument to gdb?

So you can easily start your program in an xterm and hook Emacs gdb
session into it.

Heck, you can even start your program inside of Emacs with
M-x term
and do that.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

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

* Re: How to have a separate I/O window (xterm) with GDB and Emacs?
  2004-07-07 17:04 ` How to have a separate I/O window (xterm) with GDB and Emacs? David Kastrup
@ 2004-07-07 17:24   ` Joachim Nilsson
  0 siblings, 0 replies; 4+ messages in thread
From: Joachim Nilsson @ 2004-07-07 17:24 UTC (permalink / raw)
  Cc: Help GNU Emacs

On Wed, 2004-07-07 at 19:04, David Kastrup wrote:
> Joachim Nilsson <joachim.nilsson@vmlinux.org> writes:
> > So, if someone could please tell me how I can have a separate
> > "execution window" a la DDD when using GDB in Emacs I would be
> > eternally grateful.
> > It should be possible somehow by spawning say an xterm and
> > redirect all program I/O using "gdb -tty=device" ...
> You know that gdb can easily attach to running processes with the
> `attach' command?  Or by specifying the process id as a second
> command line argument to gdb?

Ouch, why didn't I come to think of that?  It's a very good
interim solution for me, thank you David!


Regards
 /Jocke

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

* Re: How to have a separate I/O window (xterm) with GDB and Emacs?
       [not found] <mailman.113.1089219563.22971.help-gnu-emacs@gnu.org>
  2004-07-07 17:04 ` How to have a separate I/O window (xterm) with GDB and Emacs? David Kastrup
@ 2004-07-08  6:45 ` Matthieu Moy
  1 sibling, 0 replies; 4+ messages in thread
From: Matthieu Moy @ 2004-07-08  6:45 UTC (permalink / raw)


Joachim Nilsson <joachim.nilsson@vmlinux.org> writes:

> It should be possible somehow by spawning say an xterm and
> redirect all program I/O using "gdb -tty=device" ...

You could write a 2 lines script calling xterm+gdb, and call it from
the prompt of M-x gdb RET. Don't forget to pass the -fullname option
to gdb, Emacs needs it.

> I'd like to run the latest (very nice) GDB-UI in Emacs but I'm
> stuck with DDD and its separate execution window for now.

Do you know you can do

M-x gdb RET ddd --tty <program> RET

To start ddd as a separate window, in addition to the *gud* buffer ?

-- 
Matthieu

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

end of thread, other threads:[~2004-07-08  6:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.113.1089219563.22971.help-gnu-emacs@gnu.org>
2004-07-07 17:04 ` How to have a separate I/O window (xterm) with GDB and Emacs? David Kastrup
2004-07-07 17:24   ` Joachim Nilsson
2004-07-08  6:45 ` Matthieu Moy
2004-07-07 16:56 Joachim Nilsson

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.