"Always-on" benefits in debugging

gdb 7.0 helps with multi-core development

By Cameron Laird  1 comment

gdb 7.0 matters to you: that's the theme for the week. Even if you write in a language that fits gdb poorly, and even if you wouldn't use a debugger when coding in C (which you don't do), and even if you'd use a different debugger when debugging (which you don't do) in C (which you don't do), gdb still affects your world.

The previous installment of "Smart Development mentioned refined facilities for execution management: running an application backwards, scripting its analysis, and so on. Authors of high-level languages and their extensions will find these techniques particularly useful for tracking down conflicts between libraries. Moreover, while 7.0's scripting language is Python, scriptability is likely to help with development of all C-implemented high-level languages: scripts can help keep track of language-specific data structures that are otherwise hard to visualize and monitor.

My thanks to Michael Snyder who helpfully pointed out this tutorial on gdb's record-and-playback capabilities.

"Non-stop debugging"

Also important for language maintainers is gdb's growing support for 64-bit computing. 7.0 is native for MinGW and Darwin.

The biggest architectural news, though, has to do with multi-core computing. While it's been clear for four decades (if for reasons that sometimes changed from year to year) that we're headed to a computing future that involves co-operation betwteen multiple processing nodes, we remain at a relatively primitive level of implementation. Working programmers struggle with concurrency and dependency topics that were believed solved in pre-Web times.

gdb's "non-stop debugging", new with 7.0, is a small but significant step forward to getting multi-cores right. Suppose you have a multi-threaded application. Before 7.0, gdb managed all its threads together: to pause one thread and examine the program state, you necessarily paused all threads.

"Non-stop debugging" gives programmers a new choice: we can pause one thread of interest, while letting others continue to process events, retrieve a database answer, compute a difficult result, or otherwise do what they should. It feels like the anatomical analogue of moving forward from autopsies to diagnostic surgery on a living patient. To see a situation in functional context can be crucial.

"Non-stop debugging ..." fully explains gdb's facility, including its use in remote debugging and MI (machine interface). Understand: this is only the beginning; while "non-stop" is already a huge aid in some kinds of multi-threaded work, there are still many, many conveniences left to build before we are handling multi-cores as well as we should.

1 comment

    claird
    claird 2 years ago

    Here is a useful bibliography for working programmers ready to take on the multi-core monster.

      Add a comment

      Post a comment using one of these accounts
      Or join now
      At least 6 characters

      Note: Comment will appear soon after you have activated your account.
      Obscene/spam comments will be removed and accounts suspended.
      The information you submit is subject to our Privacy Policy and Terms of Service.

      ITworld LIVE

      DevelopmentWhite Papers & Webcasts

      White Paper

      HP NonStop SQL Fundamentals whitepaper

      This whitepaper offers a detailed look into the fundamentals of HP NonStop SQL solutions. See how this system delivers unprecedented levels of application availability with fail-safe data integrity and meets the needs of enterprises with large-scale business critical applications.

      White Paper

      Nebraska Medical Center case study

      See how the Nebraska Medical Center implemented a SQL solution to make information more readily available to streamline operations, improve patient care and facilitate medical research with an enterprise solution running on HP NonStop servers.

      White Paper

      Concepts of NonStop SQL/MX

      For DBAs and developers who are familiar with Oracle solutions and want to learn about NonStop SQL/MX, this whitepaper provides an overview of the similarities and differences between the two products-with a specific focus on implementation.

      White Paper

      6 Things Your CIO Needs to Know About Requirements

      If your organization is not predictably successful on technology projects, there is likely an issue in requirements. CIOs must take action and own requirements maturity improvement. There are 6 main things a CIO must know about requirements.

      Webcast On Demand

      User Experience Monitoring

      In this webinar, you will learn hints & tips for improving end-user response times from Forrester Research analyst, Jean-Pierre Garbani.

      Sponsor: Nimsoft

      See more White Papers | Webcasts

      Ask a question

      Ask a Question