Electronic Design

  
Reprints     Printer-Friendly    Email this Article    RSS        Font Size     What's This?


[POV: Point Of View]
Debugging Survey Says: What Works, What Doesn't

Peter S. Magnusson  |   ED Online ID #10695  |   July 21, 2005


When stored-program computers were first invented, it didn't take long for people to realize that programmers would spend a large part of their time on debugging. As British computer pioneer Maurice Wilkes recalls in his memoirs, "By June 1949, people had begun to realize that it was not so easy to get a program right as had at one time appeared. It was on one of my journeys between the EDSAC room and the punching equipment that the realization came over me with full force that a good part of the remainder of my life was going to be spent in finding errors in my own programs." (EDSAC was Cambridge Computer Laboratory's Electronic Delay Storage Automatic Computer, the first stored-program machine.)

Software engineers still spend a "good part of their life" finding errors in their own programs, a process we now know as debugging. Results from a survey Virtutech distributed at the Embedded Systems Conference this year confirmed that software developers spend over 50% of their time debugging.

Consequently, enhancing the efficiency of the debugging process is the most highly leveraged improvement possible to increase programmer productivity. Because the number of lines of code is doubling every two to three years but the number of programmers is only increasing at 8% per year (source: Venture Development Corp., Natick, Mass.), improving productivity is essential. If not, Jack Ganssle's observation that 80% of embedded systems are delivered late and often hopelessly bug-ridden will continue to be true.

For several decades, software developers have used the same methods and tools for debugging. Indeed, the survey revealed that nearly one-half of all respondents could not name a significant new debugging tool, technology, or process developed in the last five years. The last major advance in debugging was source-code debugging in the late 1970s, when programmers no longer had to concern themselves with the assembly code output by the compiler but could debug as if their computer were really running their high-level language directly.

But still, the major problem with current debugging methodologies remains. Finding a bug requires stopping the program just before the bug occurs, repeatedly starting the program from the beginning each time the point of interest is missed. In a complex system, with real-time inputs or multiprocessors, there is not even a guarantee that the problem will re-occur on demand. Systems like this are notorious for so-called "Heisenbugs"—bugs that disappear once the code is instrumented to track them down.

Programmers who are working on programs for hardware other than their desktop computer face additional challenges. They mainly need to know what to run their software on to debug it. Almost one-half of respondents cited used actual hardware during test and development; about 15% used some sort of virtual platform based on instruction-set simulation. Simulation has a number of fundamental advantages over real hardware, such as determinism and the ability to restart the platform from a checkpoint or, for the most complex systems, the ability to pause them and debug them all.

However, in the area of debugging, simulation makes it possible to do things that are simply impossible with the real hardware. As the program runs, it is possible to save data from the platform that enables history to be examined or even to run the code backward. Green Hills Software's Time Machine, the Time-Traveling Virtual Machines of the University of Michigan, and Virtutech's own Simics Hindsight provide increasingly powerful ways to go back in time to track down a bug after it has been detected, without restarting the program. This is especially important for the most difficult bugs, those in device-drivers, operating-system kernels, or where the bug is detected long after the original root cause has passed and the data of interest is removed from the stack.

These new powerful tools bring us one step closer to spending less of our lives "finding errors in our own programs."

See associated figure


Reprints   Printer-Friendly  Email this Article  RSS    Font Size   What's This?


  • Network-On-Chip Tools Arrive for The Masses
  • Tackling System Design Challenges Through Early Verification
  • ESL Tools Take Center Stage As Designers Move Up
  • Parasitic Extraction Tool Targets Next-Generation Custom ICs
  • Synopsys Jumps Into ESL-Synthesis Pool
  • Verify Control Systems Before Committing To Hardware
  • You're Using How Many FPGAs?
  • Tool Up For The FPGA Blitz
    1) Build A Smart Battery Charger Using A Single-Transistor Circuit
    (183 views today)
    2) Hot Hands For Some Cool Rock: Motion Sensing Meets Audio Engineering
    (173 views today)
    3) GPS-Derived Grandmaster Clock Delivers Ultra-Precise Time And Frequency Sync
    (90 views today)
    4) What's All This Transimpedance Amplifier Stuff, Anyhow? (Part 1)
    (82 views today)
    5) Science Fiction Meets Science Fact In Today's Robot Research
    (75 views today)
    ALL TOP 20



    POST YOUR COMMENTS HERE
    Name:

    Email:
    Your Comments:

    Enter the text from the image below


    Please refresh the page if you have trouble reading this text.

    Search Electronic Design
         
      
     
    Web Seminar
    Sponsored By:
    Title: Read Pacing: A Performance Enhancing Feature of PCI Express Gen 2 Switch Devices
    Speakers: 
    Date: 07/01/08
    Register: 

    Electronic Design Europe Electronic Design China EEPN Power Electronics Auto Electronics Microwaves & RF
    Mobile Dev & Design Schematics Find Power Products Military Electronics EE Events Related Resources