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]

Re: Filename with "./" in breakpoint command


On Saturday 03 December 2005 17:17, Eli Zaretskii wrote:
> > From: Vladimir Prus <ghost@cs.msu.su>
> > Date: Sat, 03 Dec 2005 15:55:10 +0300
> >
> >         $ ~/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.
>
> What are the actual source file names recorded in the debug info?
> Please show us that, and we will be able to reason whether this is a
> feature, a bug, or a missing feature.

Here's the DWARF2 entry for the file in question:

<0><213>: Abbrev Number: 1 (DW_TAG_compile_unit)
     DW_AT_stmt_list   : 316
     DW_AT_high_pc     : 0x80483dd
     DW_AT_low_pc      : 0x8048394
     DW_AT_name        : tracepoints.cpp
     
DW_AT_comp_dir    : /home/ghost/Work/Module/kdevelop3.4/languages/cpp/debugger/tests/tracepoints
     DW_AT_producer    : GNU C++ 3.3.5 (Debian 1:3.3.5-13)
     DW_AT_language    : 4      (C++)


- Volodya



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