public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug symtab/25858] [readnow] FAIL: gdb.ada/bp_c_mixed_case.exp: break <NoDebugMixedCaseFunc> Date: Mon, 20 Apr 2020 07:56:37 +0000 [thread overview] Message-ID: <bug-25858-4717-e8teSI14zq@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-25858-4717@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=25858 --- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> --- The minimal symbol NoDebugMixedCaseFunc has this address: ... $ nm outputs/gdb.ada/bp_c_mixed_case/foo_h731_021 | grep NoDebugMixedCaseFunc 0000000000401f7a T NoDebugMixedCaseFunc ... and originates from source file qux.c, which is compiled without debug info. But during the process of setting the breakpoint, we try to find out the source/line info for the function, and hit find_pc_sect_compunit_symtab, which returns the symtab for crtn.S. The corresponding CU in the debug info looks like this: ... <0><1ff76>: Abbrev Number: 1 (DW_TAG_compile_unit) <1ff77> DW_AT_stmt_list : 0x513d <1ff7b> DW_AT_ranges : 0x3490 <1ff7f> DW_AT_name : ../sysdeps/x86_64/crtn.S <1ff83> DW_AT_comp_dir : /home/abuild/rpmbuild/BUILD/glibc-2.26/csu <1ff87> DW_AT_producer : GNU AS 2.32.0 <1ff8b> DW_AT_language : 32769 (MIPS assembler) ... and the DW_AT_ranges attribute refers to: ... 00003490 ffffffffffffffff 0000000000000000 (base address) 00003490 0000000000401822 0000000000401827 00003490 000000000040dc98 000000000040dc9d 00003490 <End of list> ... So, the address of NoDebugMixedCaseFunc 0x401f7e doesn't fall in any of the two ranges, but the global block for the CU has these BLOCK_START/BLOCK_END/BLOCK_RANGES values: ... (gdb) p /x b.startaddr $8 = 0x401822 (gdb) p /x b.endaddr $9 = 0x40dc9d (gdb) p b->ranges $10 = (blockranges *) 0x0 ... so find_pc_sect_compunit_symtab decides that the symbol is part of that CU. Note btw that the static block does have ranges: ... (gdb) p /x cust->blockvector->block[1].startaddr $20 = 0x401822 (gdb) p /x cust->blockvector->block[1].endaddr $21 = 0x40dc9d (gdb) p cust->blockvector->block[1].ranges $22 = (blockranges *) 0x1ca6860 (gdb) p /x cust->blockvector->block[1].ranges.range[0] $24 = {startaddr = 0x401822, endaddr = 0x401827} (gdb) p /x cust->blockvector->block[1].ranges.range[1] $25 = {startaddr = 0x40dc98, endaddr = 0x40dc9d} ... -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2020-04-20 7:56 UTC|newest] Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-04-20 7:23 [Bug symtab/25858] New: " vries at gcc dot gnu.org 2020-04-20 7:56 ` vries at gcc dot gnu.org [this message] 2020-04-20 7:57 ` [Bug symtab/25858] " vries at gcc dot gnu.org 2020-04-20 13:49 ` vries at gcc dot gnu.org 2020-04-20 13:53 ` vries at gcc dot gnu.org 2020-04-20 15:03 ` vries at gcc dot gnu.org 2020-04-20 15:29 ` vries at gcc dot gnu.org 2020-04-20 15:52 ` vries at gcc dot gnu.org 2020-04-23 8:40 ` vries at gcc dot gnu.org 2020-06-05 6:02 ` vries at gcc dot gnu.org 2020-06-05 8:29 ` andrew.burgess at embecosm dot com 2020-10-22 11:03 ` vries at gcc dot gnu.org 2020-10-22 15:26 ` vries at gcc dot gnu.org 2020-10-26 19:31 ` vries at gcc dot gnu.org 2020-10-28 20:10 ` vries at gcc dot gnu.org
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-25858-4717-e8teSI14zq@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).