zsh-workers
 help / color / mirror / code / Atom feed
* Debug - HowTo ?
@ 1999-03-11  8:37 Helmut Jarausch
  1999-03-11  8:44 ` Phil Pennock
  0 siblings, 1 reply; 3+ messages in thread
From: Helmut Jarausch @ 1999-03-11  8:37 UTC (permalink / raw)
  To: zsh-workers

Hi,

since some of you do it every day, please give me some hints.

I would like to debug zsh with the multiline input problem.

So I need a way to run zsh under a debugger such that the input to zsh
does not get confused with the input to the debugger.
Furthermore zsh must think it gets its input from a true xterm not from a 
standard input via the debugger.

Sorry, I can't use remote debugging. But is there a way to run zsh
under the debugger in its own xterm window?

Thanks,
Helmut.






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

* Re: Debug - HowTo ?
  1999-03-11  8:37 Debug - HowTo ? Helmut Jarausch
@ 1999-03-11  8:44 ` Phil Pennock
  1999-03-11 16:10   ` Bart Schaefer
  0 siblings, 1 reply; 3+ messages in thread
From: Phil Pennock @ 1999-03-11  8:44 UTC (permalink / raw)
  To: zsh-workers

Typing away merrily, Helmut Jarausch produced the immortal words:
> Sorry, I can't use remote debugging. But is there a way to run zsh
> under the debugger in its own xterm window?

Unless you want to debug the initialisation too, start zsh in one xterm,
note its pid, attach to the running process with gdb in another window
(or using ddd).
-- 
--> Phil Pennock ; GAT d- s+:+ a23 C++(++++) UL++++/I+++/S+++/B++/H+$ P++@$
L+++ E-@ W(+) N>++ o !K w--- O>+ M V !PS PE Y+ PGP+ t-- 5++ X+ R !tv b++>+++
DI+ D+ G+ e+ h* r y?


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

* Re: Debug - HowTo ?
  1999-03-11  8:44 ` Phil Pennock
@ 1999-03-11 16:10   ` Bart Schaefer
  0 siblings, 0 replies; 3+ messages in thread
From: Bart Schaefer @ 1999-03-11 16:10 UTC (permalink / raw)
  To: Helmut Jarausch, Phil Pennock; +Cc: zsh-workers

Helmut Jarausch writes:
 > I would like to debug zsh with the multiline input problem.

There has to be something about this somewhere in the zsh-list archives,
because I reported it more than three years ago.

 > So I need a way to run zsh under a debugger such that the input to zsh
 > does not get confused with the input to the debugger.
 > Furthermore zsh must think it gets its input from a true xterm not from a 
 > standard input via the debugger.

function gdbterm () {
    xterm -title GDBterm -e sh -c "tty ; exec xterm -e gdb $*"
}

Running "gdbterm zsh" will produce two xterm windows, with gdb running
inside the second one.  The first one will display its tty name; suppose
for example that it is /dev/ttyXX.  In the xterm with the (gdb) prompt,
type

    run </dev/ttyXX >/dev/ttyXX 2>&1

and your zsh prompt will show up in the first xterm.

When you quit gdb, both xterms will disappear.

You can do this with other debuggers if they happen to understand full
redirection syntax.

Phil Pennock writes:
 > Unless you want to debug the initialisation too, start zsh in one xterm,
 > note its pid, attach to the running process with gdb in another window
 > (or using ddd).

If you're using ddd, the "run in terminal window" switch uses an xterm, so
you don't need any of this trickery.


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

end of thread, other threads:[~1999-03-11 16:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-03-11  8:37 Debug - HowTo ? Helmut Jarausch
1999-03-11  8:44 ` Phil Pennock
1999-03-11 16:10   ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

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 NNTP newsgroup(s).