How do I debug assembly code? I'm on Linux and have gdb handy. I know I can watch registers. What are some methods for debugging assembly code?
+1
A:
You can of course use breakpoints just as with C or any other compiled language, too. This article describes the process of debugging an assembly program a bit.
unwind
2010-01-19 08:10:32
Thanks. That's exactly what I was looking for.
Scott
2010-01-19 08:14:33
+1
A:
Using the "disassemble" gdb command you can see the assembly code that is about to be executed. This, in conjunction with watching registers, can give you insight into what the CPU is really doing.
Greg Hewgill
2010-01-19 08:14:18