From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15070 invoked by alias); 21 Nov 2003 14:13:01 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 15048 invoked from network); 21 Nov 2003 14:12:59 -0000 Received: from unknown (HELO bromo.msbb.uc.edu) (129.137.3.146) by sources.redhat.com with SMTP; 21 Nov 2003 14:12:59 -0000 Received: (from howarth@localhost) by bromo.msbb.uc.edu (SGI-8.9.3p2/8.9.3) id JAA18330 for gdb@sources.redhat.com; Fri, 21 Nov 2003 09:12:46 -0500 (EST) Date: Fri, 21 Nov 2003 14:13:00 -0000 From: Jack Howarth Message-Id: <200311211412.JAA18330@bromo.msbb.uc.edu> To: gdb@sources.redhat.com Subject: how to mimic redirection with gdb? X-SW-Source: 2003-11/txt/msg00191.txt.bz2 Is there any way to do the following in gdb? I am debugging a molecular dynamics program that executes the commands contained in input script files. The program has just been rebuilt with IBM XL Fortran which has exposed some pre-existing problems with the code. However I am having trouble looking at the segfaults in gdb because they only happen at the end of the execution of one of these input scripts. What I need to mimic in gdb is the following... xplor < sa-rama.inp > sa-rama.out & which is how it is normally used. Are there any tricks that will do this so that the program can be debugged without rewriting the code? It is unclear to me if there is any way to mimic this shell redirection on the gdb command line when I issue additional arguments after the 'run' command. Thanks in advance for any hints. Jack Howarth