1

I am new to OSX development, I had a question regarding running valgrind 3.6.1 on mac osx : 10.6.8

I was trying to analyze a GUI application using valgrind; However, From a console the GUI application cannot be directly launched and can be launched as: open MyApplication.app So to check this application with valgrind, I executed, valgrind --trace-children=yes open MyApplication.app but still I couldn't get valgrind to analyze the application. (Could get the logs only for the open command) I am new to Mac OSx and may be missing something obvious, could somebody pls point out how we can analyze a UI application in valgrind on Mac? The MyApplication.app is shown as a executable when seen from Mac's finder. Thanks. (Posting it here since I am yet to get a response on the mailing list)

vine'th
  • 4,890
  • 2
  • 27
  • 27
  • 1
    Out of curiosity, is there something you use in Valgrind that’s not available in Instruments? –  Sep 19 '11 at 14:50
  • The application binary is inside the app bundle and can in fact be run from the command line. – Richard Sep 19 '11 at 14:53
  • @Bavarious: Thanks for pointing me to instruments, will take a look at it. I am more of *nix developer and my affinity towards valgrind springs from this background :) – vine'th Sep 19 '11 at 14:57

1 Answers1

3

Found the solution, we can analyze the application as follows: valgrind MyApplication.app/Contents/MacOS/MyApplication

MyApplication.app is basically a folder, which contains the executable and other resources.

vine'th
  • 4,890
  • 2
  • 27
  • 27
  • Mac apps are a special kind of folder called an "application bundle". – Richard Oct 17 '11 at 05:52
  • Did it work out? Have the same problem but can't figure out - almost lost hope - could you help with this? http://stackoverflow.com/questions/41581857/valgrind-doesnt-show-ui-of-application – htzfun Jan 11 '17 at 03:05
  • @htzfun I had tried looong back, from what I remember the effort was not fruitful and I abandoned it. Its better to use XCode provided tools instead. – vine'th Jan 11 '17 at 06:27