public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "simark at simark dot ca" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug macros/29725] Dwarf 5 C macros not handled Date: Thu, 27 Oct 2022 00:58:41 +0000 [thread overview] Message-ID: <bug-29725-4717-rK5VkAh7ng@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-29725-4717@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=29725 Simon Marchi <simark at simark dot ca> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |simark at simark dot ca --- Comment #3 from Simon Marchi <simark at simark dot ca> --- Thanks, I think I was able to reproduce. Your instructions should probably include CFLAGS="-g3" though? So, I do this to reach the point in the code that you described: $ /home/simark/build/binutils-gdb/gdb/gdb --data-directory=/home/simark/build/binutils-gdb/gdb/data-directory -nx -q ./gawk -ex "b mk_binary" -ex "run -f test/divzero2.awk" -ex "advance 5539" (gdb) info macro memory The symbol `memory' has no definition as a C/C++ preprocessor macro at /home/simark/src/gawk/awkgram.c:-1 This -1 line number is fishy. Debugging gdb and breaking on macro_lookup_inclusion, and re-running "info macro memory", I can see that we do this: if (filename_cmp (name, source->filename) == 0) return source; Ref: https://gitlab.com/gnutools/binutils-gdb/-/blob/ecb58b32cdeb9789f9bc7c2037cb001d9a729f83/gdb/macrotab.c#L511 (top-gdb) p name $1 = 0x621000136670 "/home/simark/src/gawk/awkgram.y" (top-gdb) p source->filename $2 = 0x621000136610 "/home/simark/src/gawk/awkgram.c" So, GDB is getting confused because of the different source filenames. Did this really work previously, using DWARF 4 and an older GDB? -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2022-10-27 0:58 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-10-26 9:59 [Bug macros/29725] New: " drepper.fsp at gmail dot com 2022-10-26 15:47 ` [Bug macros/29725] " simon.marchi at polymtl dot ca 2022-10-26 22:09 ` drepper.fsp at gmail dot com 2022-10-27 0:58 ` simark at simark dot ca [this message] 2022-10-27 1:21 ` simark at simark dot ca
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-29725-4717-rK5VkAh7ng@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).