Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Rodrigo Dominguez <roddomi@hotmail.com>
Cc: gdb@sourceware.org
Subject: Re: How to print the current source line number
Date: Fri, 15 May 2009 17:16:00 -0000	[thread overview]
Message-ID: <83iqk2qobj.fsf@gnu.org> (raw)
In-Reply-To: <BAY109-DS599503F3B9065FC87CBA7B95F0@phx.gbl>

> From: "Rodrigo Dominguez" <roddomi@hotmail.com>
> 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?


  parent reply	other threads:[~2009-05-15 17:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-15 15:59 Rodrigo Dominguez
2009-05-15 16:19 ` Joel Brobecker
2009-05-15 17:16 ` Eli Zaretskii [this message]
2009-05-15 18:09   ` Rodrigo Dominguez
2009-05-17  6:49 ` kamaraju kusumanchi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83iqk2qobj.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=gdb@sourceware.org \
    --cc=roddomi@hotmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox