zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@tiny.zanshin.com>
To: jarausch@numa1.igpm.rwth-aachen.de (Helmut Jarausch),
	Phil Pennock <comet@fysh.org>
Cc: zsh-workers@sunsite.auc.dk
Subject: Re: Debug - HowTo ?
Date: Thu, 11 Mar 1999 08:10:51 -0800 (PST)	[thread overview]
Message-ID: <14055.60171.542888.673239@awayteam.zanshin.com> (raw)
In-Reply-To: <jarausch-990311093638.A061012@numa1>

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.


      reply	other threads:[~1999-03-11 16:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-03-11  8:37 Helmut Jarausch
1999-03-11  8:44 ` Phil Pennock
1999-03-11 16:10   ` Bart Schaefer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=14055.60171.542888.673239@awayteam.zanshin.com \
    --to=schaefer@tiny.zanshin.com \
    --cc=comet@fysh.org \
    --cc=jarausch@numa1.igpm.rwth-aachen.de \
    --cc=schaefer@zanshin.com \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).