Professional Documents
Culture Documents
This section talks about exploiting information at a register level. We will talk about
debugging programs, how to hack into programs to make them do something different
from their intended use, how to safeguard against such attacks and much more.
Debugging is essential for any serious programmer. It is unlikely that you will write
code that works flawlessly the first time. However, there are many tips and tricks that
can help the sometimes painful process of debugging go more smoothly.
There are many things that you can do but the easiest way to debug is print
information that you think is useful and try to identify the location and the source of
the bug. Start by identifying where the execution of the program halts, then try
removing parts of the code until you know exactly what causes the crash or the error
to occur. Now, is the “easy” part of understanding why the error is happening, what
you intended to happen and what you should do to fix the error. This was just the first
step to debugging and there are many more techniques and tools that can help you
out. Let’s discuss one of the most important - GDB.