From patchwork Fri Feb 16 15:41:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Burgess X-Patchwork-Id: 25948 Received: (qmail 23395 invoked by alias); 16 Feb 2018 15:41:31 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 23384 invoked by uid 89); 16 Feb 2018 15:41:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:2429 X-HELO: mail-wr0-f196.google.com Received: from mail-wr0-f196.google.com (HELO mail-wr0-f196.google.com) (209.85.128.196) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 16 Feb 2018 15:41:28 +0000 Received: by mail-wr0-f196.google.com with SMTP id v65so3294919wrc.11 for ; Fri, 16 Feb 2018 07:41:27 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=av05x9Wa9zRx+BZvW0i0pQ7ZpKanqI3AvzrKkJEF224=; b=GwlafnoN0iV3k8PUjJcRWMc0NR2QlSymJv0l7mhA/VJL1pZSXOPwxCJbQq9Ot2qQmx pnxRwgsgQfmb9vrIfIhK2CZiIKQEfywsHW42FHY8hX8jSrpUf+VvEEpXIlVJ36jpPc9L 5YC0dAmxTiJitavuPvRR/G3s87i5tq7AA8ct/Dcfa6VVDD5ZhRjvmhAbs0GXxP7dN97t EmLQRFdQOJEwszOpZ9VyAcGepvlQK8CliC9QEqmhaf7q85iXxfOzucZ471Yf+SRAUaqQ xmHuKmg4ZWCnHacQTyc9vLv3PTsbvrqydYlwh8oYiMaTiSvGE+tv7YD1WjI5rJc995fW Yd0g== X-Gm-Message-State: APf1xPAMD3A9hXQZ2EzX2HYHb7IheW/YX4NdLegyCscwhp8v5JvfGLy5 iIWTeUnCqx7tLR7GCiXCi+4nJOK4 X-Google-Smtp-Source: AH8x227BBoENgv1XK91VLyX1kY0rspDoIoO3pZCEgLIh08B5DYEtQJaEPmwBpB4IOcrdyUt6Srwryw== X-Received: by 10.223.179.209 with SMTP id x17mr5987210wrd.162.1518795685476; Fri, 16 Feb 2018 07:41:25 -0800 (PST) Received: from localhost (host86-142-70-243.range86-142.btcentralplus.com. [86.142.70.243]) by smtp.gmail.com with ESMTPSA id 30sm13911979wri.48.2018.02.16.07.41.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 16 Feb 2018 07:41:24 -0800 (PST) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCH] gdb/doc: Additional information about 'info line' Date: Fri, 16 Feb 2018 15:41:22 +0000 Message-Id: <20180216154122.1772-1-andrew.burgess@embecosm.com> X-IsSubscribed: yes Extend the documentation of 'info line' command to: 1. Make 'info line' with no argument more obvious, and make it clearer what this does. 2. Cover what happens when a secod 'info line' with no argument is issued. 3. Extend the example output for 'info line ...' to include symbolic addresses. gdb/doc/ChangeLog: * gdb.texinfo (Machine Code): Additional information about "info line" command. --- gdb/doc/ChangeLog | 5 +++++ gdb/doc/gdb.texinfo | 19 +++++++++++++------ 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 4ed5f6bbb21..ee7adc8df22 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -8432,21 +8432,22 @@ @table @code @kindex info line -@item info line @var{location} +@item info line +@itemx info line @var{location} Print the starting and ending addresses of the compiled code for source line @var{location}. You can specify source lines in any of -the ways documented in @ref{Specify Location}. +the ways documented in @ref{Specify Location}. With no @var{location} +information about the current source line is printed. @end table For example, we can use @code{info line} to discover the location of the object code for the first line of function @code{m4_changequote}: -@c FIXME: I think this example should also show the addresses in -@c symbolic form, as they usually would be displayed. @smallexample (@value{GDBP}) info line m4_changequote -Line 895 of "builtin.c" starts at pc 0x634c and ends at 0x6350. +Line 895 of "builtin.c" starts at pc 0x634c and \ + ends at 0x6350 . @end smallexample @noindent @@ -8455,7 +8456,8 @@ @var{location}) what source line covers a particular address: @smallexample (@value{GDBP}) info line *0x63ff -Line 926 of "builtin.c" starts at pc 0x63e4 and ends at 0x6404. +Line 926 of "builtin.c" starts at pc 0x63e4 and \ + ends at 0x6404 . @end smallexample @cindex @code{$_} and @code{info line} @@ -8468,6 +8470,11 @@ convenience variable @code{$_} (@pxref{Convenience Vars, ,Convenience Variables}). +@cindex info line, repeated calls +After @code{info line}, using @code{info line} again without +specifying a location will display information about the next source +line. + @table @code @kindex disassemble @cindex assembly instructions