I'm writing a C/C++ command line program which, at some point, calls IOHIDManagerOpen
. I've added both my program executable and lldb as permitted for input monitoring (as far as I remember, my program was added after showing up a permission prompt, I've added lldb manually later, trying to resolve the problem).
My problem is that when I run my program from within lldb in Terminal, the call to IOHIDManagerOpen
returns kIOReturnNotPermitted
. When I run my program directly in the terminal session (without lldb), this call returns kIOReturnSuccess
. Such behaviour means it will be impractical to use lldb for any debugging of this program.
What can be done to make lldb session behave the same way, the normal execution works?
I'm on: 23.2.0 Darwin Kernel Version 23.2.0: Wed Nov 15 21:55:06 PST 2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T6020 arm64 and: lldb-1500.0.200.58 Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5)