[Bug gdb/26594] 'info line' does not print all corresponding addresses

trass3r at gmail dot com sourceware-bugzilla@sourceware.org
Thu Sep 10 13:08:57 GMT 2020


https://sourceware.org/bugzilla/show_bug.cgi?id=26594

--- Comment #1 from trass3r <trass3r at gmail dot com> ---
Indeed the following patch using the same flags as the jump or breakpoint
commands yields expected results:

diff --git a/gdb/source.c b/gdb/source.c
index 0c2b5a4f83..6e6705779f 100644
--- a/gdb/source.c
+++ b/gdb/source.c
@@ -1463,7 +1463,7 @@ info_line_command (const char *arg, int from_tty)
   else
     {
       decoded_sals = decode_line_with_last_displayed (arg,
-                                                     DECODE_LINE_LIST_MODE);
+                                                    
DECODE_LINE_FUNFIRSTLINE);
       sals = decoded_sals;

       dont_repeat ();


$ i line test2.cpp:21
Line 22 of "test2.cpp" starts at address 0x55f4d74da3ec <foo<int>(int)+15> and
ends at 0x55f4d74da3f1 <foo<int>(int)+20>.
Line 22 of "test2.cpp" starts at address 0x55f4d74da407 <foo<float>(float)+17>
and ends at 0x55f4d74da40c <foo<float>(float)+22>.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Gdb-prs mailing list