What are the available commands for gdb in Xcode 4 which I can use to debug my app?
(Although a relatively seasoned developer, I’m looking to expand my skills with this question.)
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 can start from here http://darkdust.net/files/GDB%20Cheat%20Sheet.pdf, come is very handy.
Points worth mentioning
debugging
very handy
You can do some amount of scripting with GDB, use -x falg to point to
your script suppose you want to connect to a target over ip (remote
debugging), and you dont want to remember its ip / kepp entering it
every time. Starting from gdb 7.1 Python scripts are also supported
so much more powerful now
echo “target remote 192.168.XX.XX:1234” > gscript
gdb -x gscript application
Ok some niche stuffs –
you can try doing some unit testing on the go
Suppose you dont want to disturb the the application timing (reatime behaviour) but still want to view some variable updates, you can try following
data break points, conditional breakpoints can be very useful when debugging memory corruptions
debugging threads