This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug symtab/17602] iterate_name_matcher passes arguments to strcmp_iw in reverse order?
- From: "xdje42 at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Fri, 05 Dec 2014 17:03:45 +0000
- Subject: [Bug symtab/17602] iterate_name_matcher passes arguments to strcmp_iw in reverse order?
- Auto-submitted: auto-generated
- References: <bug-17602-4717 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=17602
Doug Evans <xdje42 at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |xdje42 at gmail dot com
--- Comment #4 from Doug Evans <xdje42 at gmail dot com> ---
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.