1 / 17

Debugging

Debugging. Louis Lombardi Marc Cunningham Padraic DeVincentis. What is it?. Debugging is a method of finding defects within code source Usually consists of looking at source code Comparing it to some coding standards Evaluating logic behind it Checking for syntax errors.

vernon
Télécharger la présentation

Debugging

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Debugging Louis Lombardi Marc Cunningham PadraicDeVincentis

  2. What is it? • Debugging is a method of finding defects within code source • Usually consists of looking at source code • Comparing it to some coding standards • Evaluating logic behind it • Checking for syntax errors

  3. Why is it needed? • Ensures that source code is operational • Typically 4 types of coding errors: • Syntax error • Semantic error • Logical error • Environment error • Helps primarily to discover 4 types of coding errors • Solves the issue of manually viewing code (reduces time)

  4. Most popular products? • GDB (GNU Debugger) • Firebug • WinDBG+ • Microsoft Visual Studio Debugger • PDB

  5. GDB (GNU Debugger) • Source: • http://www.gnu.org/software/gdb/ • History: • Richard Stallman wrote it in 1986 for the GNU project • Written after the EMACs (GNU project’s editor) was completed   • Modeled after Berkley’s Unix DBX debugger • Now it is maintained by Stallman’s Free Software Foundation • Padraic Demo:

  6. GNU Debugger (GDB) • Symbolic debugger • Built for UNIX-like operating systems • Originally written by Richard Stallman • Maintained by open source community • Works for C, C++, FreeBASIC, FreePascal, and Fortran

  7. GDB & Calculator Program (1)

  8. GDB & Calculator Program (2)

  9. GDB & Calculator Program (3)

  10. GDB & Calculator Program (4) Original get_user_num Updated get_user_num

  11. GDB & Calculator Program (5)

  12. GDB & Calculator Program (6) • Backtracing (gdb command backtrace or bt) • Provides a view into the stack’s frames • Each numbered item is a “stack frame” in the CPU’s stack • Allows you to jump between stack frames when debugging • Useful for tracking down odd behavior in variables passed around by reference in complex data structures

  13. GDB & Calculator Program (7)

  14. FireBug (Firefox Extension) • Source: • http://getfirebug.com/ • History: • First release was available January 12, 2006 (v0.2) by Mozilla • Current version was released on May 6, 2010; it is version 1.5.4   • Written by Joe Hewitt, John J Barton, Jan Odvarko, Robcee and Firebug Working Group • Marc Demo:

  15. Use with FOSS? • Used to enhance productivity of developers when writing code • Enables developers to test if code will compile before actually compiling • Allows developers to pause code execution at run-time to inspect data when troubleshooting code • All FOSS development projects use some form of a debugger to write the code for their project

  16. References: • http://www.gnu.org/software/gdb/ • http://getfirebug.com/ • http://www.gnu.org/software/gdb/committee/ • http://getfirebug.com/wiki/index.php/Main_Page • http://www.devarticles.com/c/a/HTML/Combating-Coding-Errors/1/

  17. Questions?

More Related