I have seen a lot of answers for this question:
error: failed to attach to process ID
as switch to GDB
. But no one addresses the reason of why it happens?
Attaching works fine with the GDB debugger but the default and recommended project setting is LLDB.
Can anybody explain why LLDB fails? Is it a common bug or am I doing something wrong?
Alternatively, how can I set GDB as my default debugger without changing it manually when creating the new projects?
System Info:
OS: Lion
RAM: 5GB
XCode: Version 4.6 (4H127)
Device: Mac mini
My localhost setting:
Apple likes to move forward. So setting gdb as the debugger for all new projects is not an option.
Sometimes, you have to reset the iOS Simulator to clean up the debugger.
Make sure you have
localhost
mapped to127.0.0.1
in your/etc/hosts
file:If
grep
doesn't show127.0.0.1
then add it:^ That '#' is root's command prompt; don't type it otherwise you will comment-out the statement and nothing will happen
NOTE Use
>>
and not>
! (better is to edit it usingvi
ormate
or whatever).My
/etc/hosts
file shows (ignoring comments):