From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4640 invoked by alias); 26 Aug 2015 22:25:22 -0000 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org Received: (qmail 4610 invoked by uid 48); 26 Aug 2015 22:25:22 -0000 From: "philippe.waroquiers at skynet dot be" To: gdb-prs@sourceware.org Subject: [Bug varobj/18564] regression in showing __thread so extern variable Date: Wed, 26 Aug 2015 22:25:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: varobj X-Bugzilla-Version: 7.9 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: philippe.waroquiers at skynet dot be X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-q3/txt/msg00230.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=3D18564 --- Comment #5 from philippe.waroquiers at skynet dot be --- (In reply to Mark Wielaard from comment #3) > + addr =3D target_translate_tls_address (objfile, addr - offset); Assuming this is the good fix, then a similar fix is probably needed in printcmd.c, to show the offset in the tls storage. Also, maybe an alternative solution might be to use=20 MSYMBOL_VALUE_RAW_ADDRESS(symbol) for tls variables, rather than MSYMBOL_VALUE_ADDRESS or BMSYMBOL_VALUE_ADDRESS (so as to avoid adding relocation to later substract it). In symtab.h, there is also no indication in the comment that LOC_UNRESOLVED is used for thread variables/tls storage. --=20 You are receiving this mail because: You are on the CC list for the bug. >>From gdb-prs-return-18527-listarch-gdb-prs=sources.redhat.com@sourceware.org Fri Aug 28 18:02:30 2015 Return-Path: Delivered-To: listarch-gdb-prs@sources.redhat.com Received: (qmail 735 invoked by alias); 28 Aug 2015 18:02:29 -0000 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org Delivered-To: mailing list gdb-prs@sourceware.org Received: (qmail 130881 invoked by uid 48); 28 Aug 2015 18:02:29 -0000 From: "msebor at redhat dot com" To: gdb-prs@sourceware.org Subject: [Bug c++/18881] New: bogus 'Cannot resolve function foo to any overloaded instance' Date: Fri, 28 Aug 2015 18:02:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: c++ X-Bugzilla-Version: 7.8 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: msebor at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-q3/txt/msg00231.txt.bz2 Content-length: 2634 https://sourceware.org/bugzilla/show_bug.cgi?id=18881 Bug ID: 18881 Summary: bogus 'Cannot resolve function foo to any overloaded instance' Product: gdb Version: 7.8 Status: NEW Severity: normal Priority: P2 Component: c++ Assignee: unassigned at sourceware dot org Reporter: msebor at redhat dot com Target Milestone: --- In the test case below, GNU gdb (GDB) Fedora 7.8.2-38.fc21 fails to resolve the call to foo() in the ternary ?: expression even though it resolves it successfully on its own. This makes debugging GCC difficult because it prevents gdb from printing the values of some of the tree-checking macros. For example: (gdb) macro expand DECL_IS_BUILTIN((tree)expr) expands to: (((IS_ADHOC_LOC (((contains_struct_check (((tree)expr), (TS_DECL_MINIMAL), "/home/msebor/scm/fsf/gcc-66516/gcc/c-family/c-common.c", 12896, __FUNCTION__))->decl_minimal.locus))) ? get_location_from_adhoc_loc (line_table, ((contains_struct_check (((tree)expr), (TS_DECL_MINIMAL), "/home/msebor/scm/fsf/gcc-66516/gcc/c-family/c-common.c", 12896, __FUNCTION__))->decl_minimal.locus)) : (((contains_struct_check (((tree)expr), (TS_DECL_MINIMAL), "/home/msebor/scm/fsf/gcc-66516/gcc/c-family/c-common.c", 12896, __FUNCTION__))->decl_minimal.locus))) <= ((source_location) 1)) (gdb) p DECL_IS_BUILTIN((tree)expr) Cannot resolve function contains_struct_check to any overloaded instance Test case: $ cat t.cpp && gcc -g3 t.cpp && gdb -batch -ex 'b bar' -ex r -ex 'p FOO1(b)' -ex 'p FOO2(b)' -ex 'p foo((A)b)' -ex 'p foo((A)b) ? foo((A)b) : foo((A)b)' a.out struct U { }; typedef U *A; typedef const U *B; A foo (A a) { return a; } B foo (B b) { return b; } #define FOO1(x) foo ((A)x) #define FOO2(x) foo (FOO1 (x)) ? foo (FOO1 (x)) : foo (FOO1 (x)) int bar (B b) { if (FOO2 (b)) return 1; return 0; } int main () { U u = { }; return bar (&u); } Breakpoint 1 at 0x40051e: file t.cpp, line 14. warning: the debug information found in "/usr/lib/debug//lib64/ld-2.20.so.debug" does not match "/lib64/ld-linux-x86-64.so.2" (CRC mismatch). warning: the debug information found in "/usr/lib/debug//lib64/libc-2.20.so.debug" does not match "/lib64/libc.so.6" (CRC mismatch). Breakpoint 1, bar (b=0x7fffffffdeff) at t.cpp:14 14 if (FOO2 (b)) $1 = (U *) 0x7fffffffdeff Cannot resolve function foo to any overloaded instance $2 = (U *) 0x7fffffffdeff Cannot resolve function foo to any overloaded instance -- You are receiving this mail because: You are on the CC list for the bug.