From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32606 invoked by alias); 15 May 2009 17:16:23 -0000 Received: (qmail 32589 invoked by uid 22791); 15 May 2009 17:16:20 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout7.012.net.il (HELO mtaout7.012.net.il) (84.95.2.19) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 15 May 2009 17:16:12 +0000 Received: from conversion-daemon.i-mtaout7.012.net.il by i-mtaout7.012.net.il (HyperSendmail v2007.08) id <0KJP008003KPTR00@i-mtaout7.012.net.il> for gdb@sourceware.org; Fri, 15 May 2009 20:16:09 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.228.73.80]) by i-mtaout7.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0KJP0069K3YWBO90@i-mtaout7.012.net.il>; Fri, 15 May 2009 20:16:09 +0300 (IDT) Date: Fri, 15 May 2009 17:16:00 -0000 From: Eli Zaretskii Subject: Re: How to print the current source line number In-reply-to: To: Rodrigo Dominguez Cc: gdb@sourceware.org Reply-to: Eli Zaretskii Message-id: <83iqk2qobj.fsf@gnu.org> References: X-IsSubscribed: yes 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 X-SW-Source: 2009-05/txt/msg00088.txt.bz2 > From: "Rodrigo Dominguez" > Date: Fri, 15 May 2009 11:59:11 -0400 > > How can I print the current source line number in gdb? I have tried the > 'list' command and it shows the lines around the current line. However, this > command has "memory" and doesn't show the same lines each time it is > executed. Is there a better way to print the current line number? Or is > there a way to "reset" the memory of the 'line' command so it will show the > current line centered around the output? Does list *$pc do what you want?