From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15663 invoked by alias); 25 Jul 2005 14:15:03 -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 15623 invoked by uid 22791); 25 Jul 2005 14:14:58 -0000 Received: from pluton.ispras.ru (HELO pluton.ispras.ru) (83.149.199.253) by sourceware.org (qpsmtpd/0.30-dev) with SMTP; Mon, 25 Jul 2005 14:14:58 +0000 Received: (qmail 95341 invoked from network); 25 Jul 2005 14:10:29 -0000 Received: from unknown (HELO truba.ispras.ru) (83.149.198.41) by pluton.ispras.ru with SMTP; 25 Jul 2005 14:10:29 -0000 Received: from truba.ispras.ru (root@localhost) by truba.ispras.ru (8.13.1/8.13.1) with SMTP id j6PDr4tu003168 for ; Mon, 25 Jul 2005 17:53:04 +0400 Received: from ispserv.ispras.ru (ispserv [83.149.198.72]) by truba.ispras.ru (8.13.1/8.13.1) with ESMTP id j6PDr4WK003162 for ; Mon, 25 Jul 2005 17:53:04 +0400 Received: from ispserv.ispras.ru (localhost [127.0.0.1]) by ispserv.ispras.ru (8.12.8/8.12.8) with ESMTP id j6PDxVwg023454 for ; Mon, 25 Jul 2005 17:59:31 +0400 Received: from localhost (kostik@localhost) by ispserv.ispras.ru (8.12.8/8.12.8/Submit) with ESMTP id j6PDxVh0023450 for ; Mon, 25 Jul 2005 17:59:31 +0400 Date: Mon, 25 Jul 2005 14:15:00 -0000 From: Konstantin Karganov To: gdb@sources.redhat.com Subject: Debuggee cmd-line arguments bug Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SpamTest-Version: SMTP-Filter Version 2.0.0 [0125], KAS/Release SMTP-Filter Version 2.0.0 [0125], KAS/Release X-Spamtest-Info: Pass through X-SW-Source: 2005-07/txt/msg00232.txt.bz2 Hello. Playing with the program startup arguments I've found the following "feature" of gdb. I have a program that prints its argc/argv parameters. (gdb) set args a b c d (gdb) run Starting program: /home/kostik/Work/a.out a b c d Argc=5, Argv=/home/kostik/Work/a.out,a,b,c,d Program exited normally. (gdb) set args a b c d (gdb) run >out Starting program: /home/kostik/Work/a.out >out Program exited normally. (gdb) In file out there are the folowing: Argc=1, Argv=/home/kostik/Work/a.out So when trying to redirect debuggee IO we've lost all cmd-line parameters. The same of cource happens with MI (and breaks the debugging startup for MPI program!). Is it a bug? And what is about my previous posts (still unanswered) on: - running out of source code (stepping past main) http://sources.redhat.com/ml/gdb/2005-07/msg00152.html - incorrect breakpoint diagnostics in MI http://sources.redhat.com/ml/gdb/2005-07/msg00175.html - vanishing stopping reason in MI http://sources.redhat.com/ml/gdb/2005-07/msg00173.html "And there's no doing anything about it" ? Best regards, Konstantin.