Question: using objdump for disassembly and inserting source code with object compiled with -gsplit-dwarf
Nick Clifton
nickc@redhat.com
Fri Jun 24 10:51:00 GMT 2016
Hi chiaki,
> 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?
No.
> Or is there a known bug with objdump?
It is a bug, but not a known one. Please could you open a bugzilla report
for the problem, along with, if possible, a small(ish) test case that
reproduces the problem.
> It is possible that gcc 5.3 or 6.1 may not be producing correct DWARF
> in .o and .dwp which objdump can grok
This is entirely possible. But if so, then it still may be possible to
have objdump warn the user that the debug info is broken/incomplete/missing.
As an aside - is GDB able to produce correct source+disassembly listings
from the same input file(s) ? If so then this would point more towards
objdump being at fault. If not then it may well be a G++ problem.
Cheers
Nick
More information about the Binutils
mailing list