* [PATCH] gdb/doc: Additional information about 'info line'
@ 2018-02-16 15:41 Andrew Burgess
2018-02-16 16:04 ` Eli Zaretskii
0 siblings, 1 reply; 2+ messages in thread
From: Andrew Burgess @ 2018-02-16 15:41 UTC (permalink / raw)
To: gdb-patches; +Cc: Andrew Burgess
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 <m4_changequote> and \
+ ends at 0x6350 <m4_changequote+4>.
@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 <m4_changequote+152> and \
+ ends at 0x6404 <m4_changequote+184>.
@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
--
2.14.3
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] gdb/doc: Additional information about 'info line'
2018-02-16 15:41 [PATCH] gdb/doc: Additional information about 'info line' Andrew Burgess
@ 2018-02-16 16:04 ` Eli Zaretskii
0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2018-02-16 16:04 UTC (permalink / raw)
To: Andrew Burgess; +Cc: gdb-patches
> From: Andrew Burgess <andrew.burgess@embecosm.com>
> Cc: Andrew Burgess <andrew.burgess@embecosm.com>
> Date: Fri, 16 Feb 2018 15:41:22 +0000
>
> 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.
LGTM, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-02-16 16:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-16 15:41 [PATCH] gdb/doc: Additional information about 'info line' Andrew Burgess
2018-02-16 16:04 ` Eli Zaretskii
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox