This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug symtab/17602] iterate_name_matcher passes arguments to strcmp_iw in reverse order?


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]