[Bug binutils/21235] New: The filename and the full path are truncated in "objdump --dwarf=decodedline --wide"

2017-03-08 Thread fcamel at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=21235

Bug ID: 21235
   Summary: The filename and the full path are truncated in
"objdump --dwarf=decodedline --wide"
   Product: binutils
   Version: 2.29 (HEAD)
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: binutils
  Assignee: unassigned at sourceware dot org
  Reporter: fcamel at gmail dot com
  Target Milestone: ---

Created attachment 9886
  --> https://sourceware.org/bugzilla/attachment.cgi?id=9886&action=edit
The patch which fixes the reported bug.

When the filename or the full path is too long, "objdump --dwarf=decodedline"
truncates the filename or the full path. In theory, "--wide" should prevent the
truncation. However, that doesn't work. 
Btw, "readelf --debug-dump=decodedline" works well with "--wide".

Here is the example of output:

$ binutils/readelf --debug-dump=decodedline --wide ~/dev/tmp/a.out
Decoded dump of debug contents of section .debug_line:

CU: my_very_very_very_very_very_very_very_very_long.c:
File nameLine numberStarting address
my_very_very_very_very_very_very_very_very_long.c3   
0x4004ed
my_very_very_very_very_very_very_very_very_long.c4   
0x4004f1
my_very_very_very_very_very_very_very_very_long.c5   
0x4004f6

$ binutils/objdump --dwarf=decodedline --wide ~/dev/tmp/a.out

/home/fcamel/dev/tmp/a.out: file format elf64-x86-64

Decoded dump of debug contents of section .debug_line:

CU: my_very_very_very_very_very_very_very_very_long.c:
File nameLine numberStarting address
ery_very_very_very_very_very_long.c30x4004ed
ery_very_very_very_very_very_long.c40x4004f1
ery_very_very_very_very_very_long.c50x4004f6


The attachment is a patch to fix this issue. After applying the patch:

$ binutils/objdump --dwarf=decodedline --wide ~/dev/tmp/a.out

/home/fcamel/dev/tmp/a.out: file format elf64-x86-64

Decoded dump of debug contents of section .debug_line:

CU: my_very_very_very_very_very_very_very_very_long.c:
File nameLine numberStarting address
my_very_very_very_very_very_very_very_very_long.c3   
0x4004ed
my_very_very_very_very_very_very_very_very_long.c4   
0x4004f1
my_very_very_very_very_very_very_very_very_long.c5   
0x4004f6

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/21235] The filename and the full path are truncated in "objdump --dwarf=decodedline --wide"

2017-03-08 Thread fcamel at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=21235

fcamel at gmail dot com changed:

   What|Removed |Added

 CC||fcamel at gmail dot com

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/21235] The filename and the full path are truncated in "objdump --dwarf=decodedline --wide"

2017-03-08 Thread fcamel at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=21235

--- Comment #1 from fcamel at gmail dot com ---
Forgot to mention my testing revision: 15c22686d0e33d87262bc9075296eeddd7d955f7

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils