public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug symtab/18148] Definitions with DW_AT_const_value never make it into the psymtabs Date: Fri, 27 Mar 2015 16:52:00 -0000 [thread overview] Message-ID: <bug-18148-4717-J4fXVI6Fj2@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-18148-4717@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=18148 --- Comment #1 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Andy Wingo <wingo@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ff908ebf8612a737d9e168eca0604ff6c97556bc commit ff908ebf8612a737d9e168eca0604ff6c97556bc Author: Andy Wingo <wingo@igalia.com> Date: Thu Mar 26 19:41:15 2015 +0100 Properly intern constants into psymtab Variables with a DW_AT_const_value but without a DW_AT_location were not getting added to the partial symbol table. They are added to the full symbol table, however, when the compilation unit's psymtabs are expanded. Before: (gdb) p one No symbol "one" in current context. (gdb) mt flush-symbol-cache (gdb) mt expand one.c (gdb) p one $1 = 1 After: (gdb) p one $1 = 1 To the user it's pretty strange, as depending on whether tab completion has forced expansion of all CUs or not the lookup might succeed, or not if the failure was already added to the symbol cache. This commit simply makes sure to add constants to the partial symbol tables. gdb/testsuite/ChangeLog: PR symtab/18148 * gdb.dwarf2/dw2-intercu.S (one, two): Add variables that have a const_value but not a location. * gdb.dwarf2/dw2-intercu.exp: Add tests that constants without location defined in non-main CUs are visible. gdb/ChangeLog: PR symtab/18148 * dwarf2read.c (struct partial_die_info): Add has_const_value member. (add_partial_symbol): Don't punt on symbols that have const_value attributes. (read_partial_die): Detect DW_AT_const_value. -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2015-03-26 18:43 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-03-19 19:19 [Bug symtab/18148] New: " wingo at igalia dot com 2015-03-27 16:52 ` cvs-commit at gcc dot gnu.org [this message] 2015-04-01 23:57 ` [Bug symtab/18148] " dje at google 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-18148-4717-J4fXVI6Fj2@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).