technochakra.com

Wheels Of Technology

Entries for the ‘debugging’ Category

strace Those Crashes On Linux

strace is a great tool on Linux that every developer should be aware of.  It helps trace system APIs - the APIs used, parameters passed and the error value returned.   It does not require root permissions to run.  You can generate a system call trace on a command that is executed or you can trace [...]

Leave a Comment

Temporary Breakpoint - Now You See It, Now You Don’t

Have you faced the problem of breakpoint clutter where breakpoints keep piling up only to hinder the debugging session?  It is then that one realizes that there are some breakpoints that can be deleted and others disabled. 
A useful feature in a debugger is a temporary breakpoint that automagically gets deleted when hit thereby reducing the clutter of unnecessary breakpoints.  These breakpoints are [...]

Comments (1)

GDB - Debugging In Assembly

If you haven’t debugged in assembly yet, you haven’t debugged enough :-)  Debugging assembly in gdb can be tricky at times.
A normal debugging session involving assembly language consists of the following steps -

Launch the program in gdb and set the required breakpoint(s).
When the breakpoint is hit, use the disassemble command to view the assembly language [...]

Leave a Comment

Aliases In Visual Studio’s Command Window

One trick I picked up from fellow developers was to open a file real quick in Visual Studio.  The trick was to go to the Command Window and type open <filename>.  This is a great productivity tip as you don’t have to search the file through the Solution Explorer.  And if you miss the command prompt after having worked with debuggers such [...]

Leave a Comment

Debugging - Divide And Conquer The Input Data

The rule of debugging is very simple -

“Every developer should strive to reproduce the bug by hitting the required set of breakpoints the least number of times. This allows faster and efficient debugging sessions.”

Comments (2)

Debugging - Using Breakpoint Hit Count For Fun And Profit.

If you are familiar with hit count breakpoints already, you may want to click here to jump to the advanced tricks shared in this article.
What is the hit count of a breakpoint?
A debugger allows users to set a breakpoint at a specific line in code.  When the execution reaches that line, the breakpoint is said [...]

Comments (3)

  
  • Categories

  • Sponsors