This is the mail archive of the cygwin mailing list for the Cygwin 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]

Re: .exe magic doesn't work with gprof


Dave Korn wrote:

.exe magic doesn't work with gprof. Any ideas why?

And indeed, it doesn't work the other way round... [carrying on from your testcase:]

dk@mace /artimi/firmware/test> mv foo.exe foo
dk@mace /artimi/firmware/test> rm gmon.out
dk@mace /artimi/firmware/test> ./foo
dk@mace /artimi/firmware/test> gprof foo.exe
foo.exe: No such file or directory
dk@mace /artimi/firmware/test> gprof foo
Flat profile:


Exe magic is not applied to command line arguments by the shell, otherwise
it might mangle plaintext or options: exe magic is applied when an
application tries to open a file that doesn't exist. gprof doesn't open foo
or foo.exe; it opens gmon.out. The exe magic would have to modify the
contents of gmon.out in accord with gprof's internal binary format to make a
difference here.

But how does gprof know that foo doesn't exist? It has to open or stat it. I thought that both open and stat calls support exe magic.


Krzysztof Duleba


-- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/


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