Browse Prior Art Database

Method and apparatus for displaying the call stack of optimized programs in diagnostic or debugging tools

IP.com Disclosure Number: IPCOM000013655D
Original Publication Date: 2001-Mar-01
Included in the Prior Art Database: 2003-Jun-18
Document File: 1 page(s) / 40K

Publishing Venue

IBM

Abstract

Disclosed is a method to generate a call stack from optimized stack frames with a compiler's or a runtime system's help. This method intends to allow software utilities such as debuggers to display the call stack even for code whose frames are optimized.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 67% of the total text.

Page 1 of 1

  Method and apparatus for displaying the call stack of optimized programs in diagnostic or debugging tools

    Disclosed is a method to generate a call stack from optimized stack frames with a compiler's or a runtime system's help. This method intends to allow software utilities such as debuggers to display the call stack even for code whose frames are optimized.

Functions, which are written in modern high-level languages and run on CPUs of many architectures, use frames for their working space in the stack. Frames are created and discarded in the Last In First Out manner. Optimized frames are frames that have no information of their previous frames inside the frames and are used to reduce the overhead of frame creation and special register usage.

Optimized frames are important for the performance's sake, however, it loses the useful information for maintenance of programs. Typically, the call stack is not available in debuggers when a program stops due to a defect. It is important to show the call stack in the product version of software, because we need to provide the service for customers.

To get a call stack in a software utility, typically a debugger, proceed the following steps:

A compiler generates a map that associates a program counter with a stack size, which has been disclosed in JP919980219JP1.

The compiler-generated map is appended to a generated code or is saved as a separate file.

If a compiler does not support generating the map, a runtime routine inst...