Browse Prior Art Database

Graphical Dynamic Data Breakpoints

IP.com Disclosure Number: IPCOM000106112D
Original Publication Date: 1993-Sep-01
Included in the Prior Art Database: 2005-Mar-20
Document File: 6 page(s) / 145K

Publishing Venue

IBM

Related People

Gordhamer, SL: AUTHOR [+4]

Abstract

A method for more effectively debugging programs with dynamic data structures is disclosed. The concept of a "data breakpoint", which allows the program to be stopped whenever a piece of the dynamic data structure is changed, is disclosed.

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

Graphical Dynamic Data Breakpoints

      A method for more effectively debugging programs with dynamic
data structures is disclosed.  The concept of a "data breakpoint",
which allows the program to be stopped whenever a piece of the
dynamic data structure is changed, is disclosed.

      When debugging a program with dynamic data structures, it is
often hard to find out where the data has become corrupt because of
the difficulty of visualizing the data.  For example, it is hard to
see all the data in a binary tree, because you have to follow
pointers from one node of the tree to its child nodes.  This is not
easy using conventional debuggers.

      A concept of a "data breakpoint" is proposed.

      A breakpoint is an event which causes the debugger to stop a
program under execution.  Normally, breakpoints are set at positions
in a program, so that when a program is run, it will stop at a
breakpoint when the desired statement in the program is executed.

      Proposed is the changing of dynamic data structures cause a
breakpoint condition.  Whenever data in a dynamic structure changes,
or when new structures are added to the dynamic structure, the
program under debug will stop, and the structure will be printed
graphically.

      As an example, consider the following simple data structure:

 type node = record
  LeftNode:  pointer to node    /* 4 byte pointer */
  data:      char(12)           /* 12 byte name   */

  RightNode: pointer to node    /* 4 byte pointer */
 end record                      /* 20 bytes total */

      Fig. 1 shows a simple binary tree with only one node.  The data
is filled in with "Jones", but the node does not point to any child
nodes.

      For the debugger to display this data graphically, it needs to
be told what the node represents.  In this case, a "binary tree"
would be indicated.  Next, the debugger, knowing that the node
represents a binary tree, would ask which field points to the left
child, and which field points to the right child.  The fields
LeftNode and RightNode would be indicated.  With this information,
the debugger would be able to display the small binary tree as shown
above.

      If the user requests that a data breakpoint be performed on the
binary tree, the debugger would do the following steps:

o   Watch all memory associated with the "parent node" of the tree.

o   If the left child node points to another node, perform a watch on
    the sub-tree pointed to by that node.

o   If the right child node points to another node, perform a watch
    on the sub-tree pointed to by that node.

      In this example, neither the left nor the right node point to
other nodes, so only the one node is watched.  In this case, the
three fields that are watched are 1) LeftNode, 2) data, and 3)
RightNode.  When any of these fields change, the debugger will stop
the program and display the bina...