Why does running LLDB or instruments require elevated privilages?

  • Tracing program execution in to shared libraries that were loaded by a user other than yourself requires you to be a superuser, but I'm sure there are more reasons than just shared library stack tracing. – Ian C. Feb 20 '13 at 7:18

Scanning protected memory is something only something authorized (in this case authenticated) sudoers are able to do.

Not requiring this would be a huge security risk and is part of the reason Windows from the 90's and early 00's was at higher risk of virus infection. An application could easily dip into the memory partition of another application, viewing or modifying its contents or inserting arbitrary executable code.

| improve this answer | |
  • But I seem to remember (though it's entirely possible that I'm remembering incorrectly) in Panther and Tiger (and maybe Leopard, I forget) being able to step through programs in Xcode's debugger in the school computers back in middle school, where I definitely wasn't an admin. – dented42 Feb 26 '13 at 20:11
  • 1
    When XCode spawns a new process, it "owns" that process. Instruments are launched independently of the executable code from XCode and are unrelated as far as the OS is concerned. I'm not familiar with LLDB but my guess is that there's a way to script its launch from XCode so it is the parent process of the code in question. – zwerdlds Feb 26 '13 at 21:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .