Is it possible to use GDB or LLDB from the Terminal command-line under Mac OS X to debug apps running on the iOS Simulator? (e.g. not from within Xcode’s GUI or console, but using an external command-line or process). If so, how?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You’ll need to have the app already in the simulator’s Springboard; you can’t launch the app in the simulator from Xcode and then expect to be able to have a command line instance of gdb attach to it.
So:
% gdb ... (gdb) attach --waitfor 'Name Of Your App'main()is executed. So you can set some breakpoints, or whatever. Then:(gdb) continueThe procedure for
lldbis similar:% lldb (lldb) process attach -n 'Name Of Your App' --waitfor <launch your app in the simulator> (lldb) continueI am not sure why you’d want or need to do this, but as an old command line gdb (and dbx) guy, I can appreciate it. 🙂