Browse Prior Art Database

A system for working with multiple versions of software data structures in a diagnostic tool. Disclosure Number: IPCOM000199943D
Publication Date: 2010-Sep-21
Document File: 4 page(s) / 73K

Publishing Venue

The Prior Art Database


Disclosed is a system for allowing a single version of a software diagnostic tool to analyse data structures from multiple different versions of a software product. It uses an intermediate "data structure superset" to maintain a consistent interface for diagnostic tooling, while be able to adapt to new versions of product data structures and invisibly handle changes in data structure field offsets.

This text was extracted from a PDF file.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 51% of the total text.

Page 1 of 4

A system for working with multiple versions of software data structures in a diagnostic tool.

Software systems implemented in languages such as C & C++ store data in structures (C structs, C++ classes) that contain fields. When analysing the data of a software system (e.g. extracting software state from a core dump) the analyser needs to understand the format of these data structures to be able to work with them. Over the lifetime of a software system, the shape of the data structures will change as defects are fixed and features are added. At any one time, multiple versions of the software system may be being supported by the software vendor. Diagnostic tooling for a software system is used to debug problems in the software. It is desirable that a single version of the diagnostic tool is able to work with data from multiple versions of a software system, to avoid having to maintain and catalogue multiple versions of the diagnostic tool. A diagnostic tool for inspecting the state of the software system comprises knowledge of data structures and algorithm logic that walk the data structures to extract state. (For example, a tool for extracting Java stacks from a core dump consists of the knowledge of the data structures that make up a Java thread stack, and the algorithm that can walk those data structures to extract a string representation of the thread stack).

The problem to be solved is how to handle multiple versions of a given data structure at the same time.

The possible solutions for this problem are:
Have a separate copy of the diagnostic tool matched to each version of the


software system in the field. The key disadvantage of this approach is managing the multiple copies of diagnostic tools.

Have a single tool with knowledge of multiple data structure versions internally.


    Existing implementations of solution 2 involve merging the knowledge of the data structures with the algorithms - creating complex and brittle branch logic like this:
if (usingStructureVersionN) {
} else if (usingStructureVersion(N-1)) {
} else if (usingStructureVersion1) {

This paper describes an improved system for solution 2.

We propose an intermediate data structure representation that allows algorithm code to be written against a consistent Java interface, whose implementation is generated at runtime to work with the data structure versions for a particular version of the software system being analysed.

The advantages over prior techniques are:

  It is resilient to structure changes (fields within the data structure moving around), removing the maintenance burden
It removes the requirement for complicated branch logic in-line with the algorithm code
The suggested implementation in Java (see below) has specific advantages over other possible implementations.

One possible implementation is based on Java code representing C & C++ data

Page 2 of 4

structures. The basic operation is:
1) Represent the C and C++ data st...