public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug exp/24985] Cannot print value of global variable because decl in one CU shadows def in other CU
       [not found] <bug-24985-4717@http.sourceware.org/bugzilla/>
@ 2020-04-09 11:24 ` vries at gcc dot gnu.org
  2020-04-09 11:53 ` vries at gcc dot gnu.org
  1 sibling, 0 replies; 2+ messages in thread
From: vries at gcc dot gnu.org @ 2020-04-09 11:24 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=24985

--- Comment #3 from Tom de Vries <vries at gcc dot gnu.org> ---
Tentative patch, as posted earlier here (
https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/29 ):
...
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 0a7a0334202..381bd45e805 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -21830,6 +21830,10 @@ new_symbol (struct die_info *die, struct type *type,
struct dwarf2_cu *cu,
              else if (attr2 && (DW_UNSND (attr2) != 0)
                       && dwarf2_attr (die, DW_AT_type, cu) != NULL)
                {
+                 if (die->tag == DW_TAG_variable && die_is_declaration (die,
cu)
+                     && TYPE_LENGTH (SYMBOL_TYPE (sym)) == 0)
+                     suppress_add = 1;
+
                  /* A variable with DW_AT_external is never static, but it
                     may be block-scoped.  */
                  list_to_add
...

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug exp/24985] Cannot print value of global variable because decl in one CU shadows def in other CU
       [not found] <bug-24985-4717@http.sourceware.org/bugzilla/>
  2020-04-09 11:24 ` [Bug exp/24985] Cannot print value of global variable because decl in one CU shadows def in other CU vries at gcc dot gnu.org
@ 2020-04-09 11:53 ` vries at gcc dot gnu.org
  1 sibling, 0 replies; 2+ messages in thread
From: vries at gcc dot gnu.org @ 2020-04-09 11:53 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=24985

--- Comment #4 from Tom de Vries <vries at gcc dot gnu.org> ---
Filed related PR25807 - "[readnow] FAIL: gdb.threads/tls.exp: print
a_thread_local".

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-04-09 11:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-24985-4717@http.sourceware.org/bugzilla/>
2020-04-09 11:24 ` [Bug exp/24985] Cannot print value of global variable because decl in one CU shadows def in other CU vries at gcc dot gnu.org
2020-04-09 11:53 ` vries at gcc dot gnu.org

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).