Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Debug - HowTo ?
- X-seq: zsh-workers 5760
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: jarausch@xxxxxxxxxxxxxxxxxxxxxxxxx (Helmut Jarausch), Phil Pennock <comet@xxxxxxxx>
- Subject: Re: Debug - HowTo ?
- Date: Thu, 11 Mar 1999 08:10:51 -0800 (PST)
- Cc: zsh-workers@xxxxxxxxxxxxxx
- In-reply-to: <jarausch-990311093638.A061012@numa1>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <jarausch-990311093638.A061012@numa1> <19990311084426.A2895@xxxxxxxx>
- Reply-to: Bart Schaefer <schaefer@xxxxxxxxxxx>
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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author