is00hcw / gperftools

Automatically exported from code.google.com/p/gperftools
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

pprof -disasm / -list fail on OS X due to renamed and incompatible objdump #668

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Try to use the -disasm or -list commands on a function.

What is the expected output?
Disassembly or annotated source.

What do you see instead?
"no filename found" or "0 samples".

What version of the product are you using? On what operating system?
Latest snapshot (as of 2014-01-21).

Please provide any additional information below.
Macports and Homebrew both install "gobjdump" as part of the binutils package, 
but pprof references a hardcoded "objdump".
When I changed the executable name (pprof line 1366), it produced a new error:
Can't exec "-C": No such file or directory at /usr/local/bin/pprof line 1370.
 -C -d -l --no-show-raw-insn --start-address=0x0000000100001e0e --stop-address=0x0000000100002370 [my executable path]: No such file or directory

Original issue reported on code.google.com by denpasho...@gmail.com on 21 Jan 2015 at 6:00

GoogleCodeExporter commented 9 years ago
Ok, the way I changed the objdump exec name was wrong; now -disasm appears to 
work but -list fails because $instructions[$i]->[2] on line 1651 always 
evaluates to -1.

Original comment by denpasho...@gmail.com on 21 Jan 2015 at 6:10

GoogleCodeExporter commented 9 years ago
Consider sending a patch, please.

Original comment by alkondratenko on 21 Jan 2015 at 6:11

GoogleCodeExporter commented 9 years ago
Unfortunately, gobjdump doesn't appear to understand the executable format on 
Macs, so I can't make it produce the needed output :-/

Original comment by denpasho...@gmail.com on 29 Jan 2015 at 12:35