Using Eclipse CDT on Mac may give different errors while debugging like below :
GDB in Eclipse CDT: Failed to execute MI command / program terminated with signal SIGTRAP, Trace/breakpoint trap
To solve this problem requires :-
- Installation of latest gdb using Brew
- Create a new certificate for gdb and then codesign it
- Open Key Chain Access
- Create Certificate Assistant\Create new certificate
- Select name as "gdb-cert" and set identity type to "Self Signed"
- Set certificate type to "Code Signing" and select "Let me override defaults"
- Click on continue till you get "Specify a location" and choose "System"
- Codesign the gdb
sudo codesign -s gdb-cert /usr/local/bin/gdb
- Create a new .gdbinit file and edit the Eclipse preferences with the full path to gdb and .gdbinit
echo "set startup-with-shell off" >> ~/.gdbinit
Comments
Post a Comment