public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "trass3r at gmail dot com" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug gdb/26594] New: 'info line' does not print all corresponding addresses Date: Wed, 09 Sep 2020 22:23:06 +0000 [thread overview] Message-ID: <bug-26594-4717@http.sourceware.org/bugzilla/> (raw) https://sourceware.org/bugzilla/show_bug.cgi?id=26594 Bug ID: 26594 Summary: 'info line' does not print all corresponding addresses Product: gdb Version: HEAD Status: UNCONFIRMED Severity: normal Priority: P2 Component: gdb Assignee: unassigned at sourceware dot org Reporter: trass3r at gmail dot com Target Milestone: --- #include <string> template <typename T> int foo(T t) { return 0; } int main(int argc, const char* argv[]) { return foo(0.5f) + foo(5); } $ info line test.cpp:6 Line 6 of "test.cpp" starts at address 0x55555555516c <foo<float>(float)+13> and ends at 0x555555555171 <foo<float>(float)+18>. It should also give the address inside foo<int> which it does know about: $ -symbol-list-lines test.cpp lines: [{pc=0x0000555555555129,line=10},{pc=0x000055555555513d,line=11},{pc=0x000055555555514c,line=11},{pc=0x0000555555555156,line=11},{pc=0x0000555555555158,line=12},{pc=0x000055555555515f,line=0},{pc=0x000055555555515f,line=4},{pc=0x000055555555516c,line=6},{pc=0x0000555555555171,line=7},{pc=0x0000555555555173,line=0},{pc=0x0000555555555173,line=4},{pc=0x000055555555517e,line=6},{pc=0x0000555555555183,line=7},{pc=0x0000555555555185,line=0}] This is necessary to properly implement jump support in IDEs as a simple jump test.cpp:6 fails: "Unreasonable jump request" https://github.com/bminor/binutils-gdb/blob/6d2f9adc6709572e9ef70f11961819e27b918568/gdb/infcmd.c#L1083-L1086 Interestingly the code is written with multiple matches in mind but passes the DECODE_LINE_LIST_MODE flag: https://github.com/bminor/binutils-gdb/blob/a3d674e0226291747cbfac9c73250e5193c06a57/gdb/source.c#L1465-L1474 Also the info line functionality is totally missing from MI. https://sourceware.org/bugzilla/show_bug.cgi?id=13687 -- You are receiving this mail because: You are on the CC list for the bug.
next reply other threads:[~2020-09-09 22:23 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-09-09 22:23 trass3r at gmail dot com [this message] 2020-09-10 13:08 ` [Bug gdb/26594] " trass3r at gmail dot com 2024-04-04 17:18 ` tromey at sourceware dot org 2024-04-04 18:54 ` trass3r at gmail dot com
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=bug-26594-4717@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@sourceware.org \ /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: linkBe 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; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).