Browse Prior Art Database

Nestable and Granular Trace Support in a Debugger

IP.com Disclosure Number: IPCOM000111355D
Original Publication Date: 1994-Feb-01
Included in the Prior Art Database: 2005-Mar-26
Document File: 2 page(s) / 84K

Publishing Venue

IBM

Related People

Borchardt, EK: AUTHOR [+2]

Abstract

Disclosed is a mechanism for limiting the collection of trace information to the optimal set of logic units such that the resulting trace information is as beneficial as possible to the software developer using the debugger. This support is provided by enhancing the typical trace support in the following areas:

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 53% of the total text.

Nestable and Granular Trace Support in a Debugger

      Disclosed is a mechanism for limiting the collection of trace
information to the optimal set of logic units such that the resulting
trace information is as beneficial as possible to the software
developer using the debugger.  This support is provided by enhancing
the typical trace support in the following areas:

o   The trace state of the system is managed via a stack rather than
    as a single flag.

o   The trace state is affected whenever a Tracepoint is encountered.
    Tracepoints can be placed on both named and unnamed logic units.

      A logic unit is any collection of logic statements that are
defined within the source language.  A single statement constitutes a
collection, so a logic unit includes a single statement, a group of
statements that is named within the source language (entry point,
process, statement group), or an entire application or program.

      A tracepoint is a specialized debugging trigger that directs
the debugger to alter the system's global trace state.  A tracepoint
is associated with a logic unit.  A tracepoint affects the system's
trace state at two points:

o   upon entry into the logic unit

o   upon exit from the logic unit

A tracepoint is triggered when its associated logic unit is
encountered during test execution.  Upon entry into the logic unit, a
tracepoint can:

o   turn TRACE ON

o   turn TRACE OFF

Upon exit from the logic unit, a tracepoint can:

o   turn TRACE ON

o   turn TRACE OFF

o   RESTORE the trace state to its value prior to entry into the
    logic unit

All combinations of entry and exit actions are available.

      The ability to control the amount of trace output is improved
by allowing trace state changes to be nested and by allowing
tracepoints to be associated with more granular logic units, such as
a single statement.  The algorithm in pseudo-code is as follows:

  retrieve the next logic unit to execute (under control of debugger)
   is a tracepoint associated?
       YES:
          push ENTRY criteria on system trace state stack
   execute the logic unit (may result in other LUs being executed)
which
   will query the trace state to determine if tracing desired
   is a tracepoint associated?
       YES:
          is EXIT criteria RESTORE?
             YES:
                pop system trace state stack
             NO:
                clear system trace state stack
                push EXIT criteria (OFF or ON)

o   Trace state changes ar...