This is the mail archive of the mailing list for the binutils 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]

Question: using objdump for disassembly and inserting source code with object compiled with -gsplit-dwarf


I have been using GNU with gcc's -gsplit-dwarf feature very successfully to build Mozilla's thunderbird mail client. It is a big binary but the use of -gsplit-dwarf and has made the linking manageable.

I have come to understand a subtle issue, though.

In the traditional full dwarf information inside .o file means,
objdump -S -d test.o
can disassemble the object file and intersperse the
lines from the original source file.

After testing with a simple small C source file,
I suppose objdump can work with an object compiled with -gsplit-dwarf to
list disassembly mixed with the original source file.

However, for a medium size c++ file, I found that the source inclusion is not very good. The function signature is inserted, but no source code lines somehow.
Is this to be expected?
Or is there a known bug with objdump?
It is possible that gcc 5.3 or 6.1 may not be producing correct DWARF in .o and .dwp which objdump can grok, but I have no idea.

I can send a sample .o, .dwo, and the source file for review.
There must be something wrong because in the objdump -S -d listing
I see a repetition of a source snippet smallish helper function over and over again.
That can't be right.

I have tested with the following version:
objdump --version
GNU objdump (GNU Binutils)



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