From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22685 invoked from network); 11 Mar 1999 16:13:25 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 11 Mar 1999 16:13:25 -0000 Received: (qmail 24539 invoked by alias); 11 Mar 1999 16:13:05 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 5760 Received: (qmail 24532 invoked from network); 11 Mar 1999 16:13:03 -0000 X-Authentication-Warning: awayteam.zanshin.com: schaefer set sender to schaefer@tiny.zanshin.com using -f From: Bart Schaefer MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <14055.60171.542888.673239@awayteam.zanshin.com> Date: Thu, 11 Mar 1999 08:10:51 -0800 (PST) To: jarausch@numa1.igpm.rwth-aachen.de (Helmut Jarausch), Phil Pennock Cc: zsh-workers@sunsite.auc.dk Subject: Re: Debug - HowTo ? In-Reply-To: References: <19990311084426.A2895@fysh.org> X-Mailer: VM 6.68a under Emacs 20.3.5.1 Reply-To: Bart Schaefer 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 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.