From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9386 invoked by alias); 22 Dec 2014 14:46:43 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 9337 invoked by uid 89); 22 Dec 2014 14:46:42 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.9 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 22 Dec 2014 14:46:41 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sBMEkeg6021078 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 22 Dec 2014 09:46:40 -0500 Received: from host2.jankratochvil.net (ovpn-116-47.ams2.redhat.com [10.36.116.47]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id sBMEkbIK010707 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Mon, 22 Dec 2014 09:46:39 -0500 Date: Mon, 22 Dec 2014 14:46:00 -0000 From: Jan Kratochvil To: Mahmood N Cc: "gdb@sourceware.org" Subject: Re: Passing piped commands as argument to gdb Message-ID: <20141222144636.GA19648@host2.jankratochvil.net> References: <20141222135517.GA18541@host2.jankratochvil.net> <993728742.194204.1419259380485.JavaMail.yahoo@jws106122.mail.bf1.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <993728742.194204.1419259380485.JavaMail.yahoo@jws106122.mail.bf1.yahoo.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes X-SW-Source: 2014-12/txt/msg00034.txt.bz2 On Mon, 22 Dec 2014 15:43:00 +0100, Mahmood N wrote: > What you wrote, and what I tested results in the execution of the program > under gdb. So it start and run the program. Now, I want to first set > a breakpoint then run the program under gdb. OK, sorry. > $ g++ -g -ggdb -o dir-pred dir-pred.cpp > $ rm pipe > $ mknod pipe p > $ bzcat file.bz2 > pipe & > [1] 18321 > $ gdb > GNU gdb (GDB) Red Hat Enterprise Linux (7.2-60.el6) > (gdb) break dir-pred.cpp:26 > No symbol table is loaded. Use the "file" command. > Make breakpoint pending on future shared library load? (y or [n]) When running just plain "gdb" you need to do what it says to you, that is: (gdb) file ./run_prog (gdb) break dir-pred.cpp:26 - There will be no question due to the "file" command above. (gdb) run