public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "simon.farre.cx at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/109902] gcc/g++ emits wrong column number in DWARF Date: Thu, 18 May 2023 19:29:01 +0000 [thread overview] Message-ID: <bug-109902-4-ipL6YlrePJ@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-109902-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109902 --- Comment #1 from Simon Farre <simon.farre.cx at gmail dot com> --- This is slightly off-topic, but still relevant to this discussion. In the attachment, we can see this line " const auto res3 = b.set_foo (next_v ()).set_bar (next_v ()).set_baz (next_v ()).finalize ([] (auto v) { return v * 3; });" -- GCC -- Address Line Column File ISA Discriminator Flags ------------------ ------ ------ ------ --- ------------- ------------- 0x00000000004011ee 68 31 1 0 0 is_stmt 0x0000000000401206 68 51 1 0 0 is_stmt 0x0000000000401218 68 71 1 0 0 is_stmt 0x0000000000401227 68 92 1 0 0 is_stmt 0x00000000004012ee 68 93 1 0 0 is_stmt 0x00000000004012f9 68 118 1 0 0 is_stmt 0x0000000000401302 68 121 1 0 0 is_stmt where as clang outputs: Address Line Column File ISA Discriminator Flags ------------------ ------ ------ ------ --- ------------- ------------- 0x00000000004011fd 68 32 1 0 0 is_stmt 0x000000000040120b 68 23 1 0 0 0x0000000000401217 68 52 1 0 0 0x0000000000401225 68 43 1 0 0 0x0000000000401231 68 72 1 0 0 0x000000000040123f 68 63 1 0 0 0x0000000000401247 68 83 1 0 0 0x0000000000401450 68 0 1 0 0 is_stmt 0x000000000040145b 68 116 1 0 0 is_stmt prologue_end 0x000000000040145f 68 107 1 0 0 0x0000000000401461 68 107 1 0 0 end_sequence As we can see, clang outputs information to the actual column meta data for calls at parameter sites whereas GCC does not. Providing these positions in source code opens up for "ergonomics-features", particularly in GDB as GDB can more easily determine sites of interest to step to, set breakpoints at, etc.
prev parent reply other threads:[~2023-05-18 19:29 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-05-18 12:26 [Bug debug/109902] New: " simon.farre.cx at gmail dot com 2023-05-18 19:29 ` simon.farre.cx at gmail dot com [this message]
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-109902-4-ipL6YlrePJ@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.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).