70 likes | 196 Views
SBE201 – Data Structures and Algorithms in C. Intro to Debugging. Marwan H. Hussein, TA B.Sc., Systems & Biomedical Engineering Department, Cairo University Egypt. C ontents. Potential of debugging Features of a typical debugger. Potential of debugging.
E N D
SBE201 – Data Structures and Algorithms in C Intro to Debugging Marwan H. Hussein, TA B.Sc., Systems & Biomedical Engineering Department, Cairo University Egypt
Contents • Potential of debugging • Features of a typical debugger
Potential of debugging • Imagine there’s a big code that you want to know many intermediate values of its variables while its running.. • You can use printf() several time, but this is going to be time consuming
A Debugger • A debugger is a program (separate from the compiler & linker) that allows you to run your binaries while giving you the ability of a ProgramCntr!! • Like compilers, many debuggers exist: • VS debugger • GNU debugger (what we gonna use open source)
Abilities of a debugger • Continuous running • But stopping @ breakpoints • Single stepping • Step over • Step into • Step out • Function call stack • Several other things (advanced) Let’s see this in Eclipse
drills • For pointers on 32-bit OS • Why pointer values appear in 8 numbers? • For call stack What you think this is ??