From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5218 invoked by alias); 17 May 2009 06:49:48 -0000 Received: (qmail 5208 invoked by uid 22791); 17 May 2009 06:49:48 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-gx0-f157.google.com (HELO mail-gx0-f157.google.com) (209.85.217.157) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 17 May 2009 06:49:42 +0000 Received: by gxk1 with SMTP id 1so5255750gxk.0 for ; Sat, 16 May 2009 23:49:40 -0700 (PDT) MIME-Version: 1.0 Received: by 10.90.113.17 with SMTP id l17mr4607476agc.65.1242542980405; Sat, 16 May 2009 23:49:40 -0700 (PDT) In-Reply-To: References: Date: Sun, 17 May 2009 06:49:00 -0000 Message-ID: <1d9315cf0905162349t37d07776w419c8bb3d39fef2d@mail.gmail.com> Subject: Re: How to print the current source line number From: kamaraju kusumanchi To: Rodrigo Dominguez Cc: gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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/msg00100.txt.bz2 On Fri, May 15, 2009 at 11:59 AM, Rodrigo Dominguez wrote: > Hi, > > 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? > > Thank you, > > Rodrigo Dominguez > > Is info program what you are looking for? raju