From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20889 invoked by alias); 5 Dec 2014 17:03:48 -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 20858 invoked by uid 48); 5 Dec 2014 17:03:47 -0000 From: "xdje42 at gmail dot com" To: gdb-prs@sourceware.org Subject: [Bug symtab/17602] iterate_name_matcher passes arguments to strcmp_iw in reverse order? Date: Fri, 05 Dec 2014 17:03:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: symtab X-Bugzilla-Version: 7.8 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: xdje42 at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: 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: 2014-q4/txt/msg00340.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=17602 Doug Evans changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |xdje42 at gmail dot com --- Comment #4 from Doug Evans --- Filing for reference sake. To see the bug, apply the attached patch, and do this: # First build the test binary. bash$ make check RUNTESTFLAGS=anon-ns.exp FAIL: gdb.cp/anon-ns.exp: list (anonymous namespace)::doit1(void) The following example doesn't use that failure, but it could. bash$ make run GDBFLAGS=testsuite/gdb.cp/anon-ns (gdb) b doit(void) --> Function "doit(void)" not defined. Make breakpoint pending on future shared library load? (y or [n]) n (gdb) mt expand anon-ns2 (gdb) b doit(void) Breakpoint 1 at 0x40065a: file ../../../linespecs/gdb/testsuite/gdb.cp/anon-ns2.cc, line 76. The problem is that when iterate_name_match gets called to see if the symtab of "doit" should be expanded, "doit" is passed in arg1 to strcmp_iw and "doit()" is passed in arg2 to strcmp_iw, whereas ISTM that it's intended to pass them in the opposite order, as explained in the comments of the currently reverted patch. -- You are receiving this mail because: You are on the CC list for the bug.