Presentation is loading. Please wait.

Presentation is loading. Please wait.

Intro to Debugging Marwan H. Hussein, TA B.Sc., Systems & Biomedical Engineering Department, Cairo University Egypt SBE201 – Data Structures and Algorithms.

Similar presentations


Presentation on theme: "Intro to Debugging Marwan H. Hussein, TA B.Sc., Systems & Biomedical Engineering Department, Cairo University Egypt SBE201 – Data Structures and Algorithms."— Presentation transcript:

1 Intro to Debugging Marwan H. Hussein, TA B.Sc., Systems & Biomedical Engineering Department, Cairo University Egypt SBE201 – Data Structures and Algorithms in C

2 Contents Potential of debugging Features of a typical debugger

3 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

4 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)

5 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

6 drills For pointers on 32-bit OS – Why pointer values appear in 8 numbers? For call stack What you think this is ??

7 Gdb shortcuts BuildCtrl+b Toggle breakpointCtrl+Shift+b debugF11 resumeF8 Step overF6 Step intoF5 Step outF7 terminateCtrl+F2


Download ppt "Intro to Debugging Marwan H. Hussein, TA B.Sc., Systems & Biomedical Engineering Department, Cairo University Egypt SBE201 – Data Structures and Algorithms."

Similar presentations


Ads by Google