[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: No source file named xxxx
From: |
explodingbadger |
Subject: |
Re: No source file named xxxx |
Date: |
Wed, 13 May 2009 19:48:47 -0700 (PDT) |
Hi thanks for your help I just worked it out:
Here is the original make file (actually simplified to make the point)
Test: Test.o
g++ -g3 -gdwarf-2 Test.o -o Test
I noticed if I do this then the debug flags are only used during the linking
phase not in the compilation
If I change the make file to
Test: Test.cpp
g++ -g3 -gdwarf-2 Test.cpp -o Test
Then it works!
Thanks a lot.
Charles Manning-2 wrote:
>
> Does gdb find symbols in Test.cpp? If you set a break on a symbol and it
> has
> line info then you should see that displayed. eg.
>
> (gdb) b main
> Breakpoint 1 at 0x8048385: file xx.c, line 3.
>
> The default -g level is 2, I wonder whether -g3 is causing some confusion.
> Try
> just -g
>
>
>
> On Thursday 14 May 2009 14:19:31 explodingbadger wrote:
>> > I would not rely on strip to tell you this. Try objdump.
>> >
>> > In gdb you should be able to hit tab after entering break and gdb
>> should
>> > show
>> > you symbols. You should be able to see file names in the symbols.
>> >
>> > (gdb) break Tes<tab> should also give you completion.
>>
>> Hi thanks very much for your reply.
>>
>> Using tab and auto completion it seems that some files are known for
>> example the debugger 'knows' the source files for a static library I am
>> linking to but not for Test.cpp. I tested this by setting a break point
>> in
>> the shared library using
>> break <filename>:<line number> and it worked but not for Test.cpp.
>>
>> Looking at the out put for objdump -g I do get a lot of information. It
>> looks like this:
>>
>> <2><b3a7>: Abbrev Number: 29 (DW_TAG_subprogram)
>> <b3a8> DW_AT_external : 1
>> <b3a9> DW_AT_name : (indirect string, offset: 0x595d):
>> operator FixOrdType*
>> <b3ad> DW_AT_decl_file : 30
>> <b3ae> DW_AT_decl_line : 313
>> <b3b0> DW_AT_MIPS_linkage_name: (indirect string, offset: 0x4b37):
>> _ZNK8ZmAtomicIP10FixOrdTypeEcvS1_Ev
>> <b3b4> DW_AT_type : <0xb4b1>
>> <b3b8> DW_AT_declaration : 1
>> <b3b9> DW_AT_sibling : <0xb3c4>
>
>
>
>
>
>
--
View this message in context:
http://www.nabble.com/No-source-file-named-xxxx-tp23532648p23533475.html
Sent from the Gnu - gdb - General mailing list archive at Nabble.com.