This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Question: using objdump for disassembly and inserting source code with object compiled with -gsplit-dwarf
- From: Nick Clifton <nickc at redhat dot com>
- To: "ISHIKAWA,chiaki" <ishikawa at yk dot rim dot or dot jp>, Binutils <binutils at sourceware dot org>
- Date: Fri, 24 Jun 2016 11:51:14 +0100
- Subject: Re: Question: using objdump for disassembly and inserting source code with object compiled with -gsplit-dwarf
- Authentication-results: sourceware.org; auth=none
- References: <a9e39097-1e6d-ba92-c350-6a69820fa931 at yk dot rim dot or dot jp>
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