This is the mail archive of the binutils@sourceware.org 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]

objdump -S omits source when input uses .gnu_debuglink


Hi all,

When an object's debugging information resides in a separate file, linked via a
.gnu_debuglink section, `objdump -S' does not show source code; the output is
rigorously identical to that of `objdump -d'.  The following command sequence
illustrates the problem:

  echo 'int main() { return 0; }' >foo.c
  gcc -g foo.c -o foo
  objcopy --strip-debug --add-gnu-debuglink=foo foo foo-link
  objdump -S foo	| sed -n '/<main>/,/^$/p'
  objdump -S foo-link	| sed -n '/<main>/,/^$/p'

The gdb `list' command reads source from both objects without trouble.

CVS exhibits the problem, as do older versions.

Thanks.


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