This is the mail archive of the gdb@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]

Filename with "./" in breakpoint command


Hi,
I just got the following gdb session:

        $ ~/build/gdb-cvs/gdb/gdb tracepoints
        GNU gdb 6.4.50.20051121-cvs
        (gdb) b ./tracepoints.cpp:12
        No source file named ./tracepoints.cpp.
        Breakpoint 1 (./tracepoints.cpp:12) pending.
        (gdb) b tracepoints.cpp:12
        Breakpoint 2 at 0x80483c4: file tracepoints.cpp, line 12.
        (gdb) quit
        $ ls tracepoints.cpp
        tracepoints.cpp

It looks like leading "./" in file name confuses gdb. This "./" thing is
send by KDevelop in some cases. I'm about to fix on KDevelop side just to
make sure it works with gdb 6.4, but actually, this seems like a bug in
gdb. Say, I have two files called util.cpp -- one in current dir, and
another in some library. It's reasonable to use "./util.cpp" to refer to a
file in the current dir, no? So, is this a bug, and should I file it in the
tracker?

- Volodya



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