Method and apparatus for debugging of optimized code

Bruce Olsen (Inventor), Le-Chun Wu (Inventor), Wen-Mei W Hwu (Inventor)

Research output: Patent

Abstract

The invention is a method for debugging a machine code of a program that has been subjected to an optimizing action, wherein the machine code may have been reordered, duplicated, eliminated or transformed so as not to correspond with the program's source code order. The method derives a table which associates each machine code instruction with a source construct for which it was generated. The user sets a breakpoint at a breakpoint P in the source code where execution is to stop. Then the method determines at least one corresponding location for the breakpoint in the machine code through use of the table, and executes by native execution or emulation only machine code instructions which correspond to source constructs that precede the breakpoint in the source code order. The method further enables a comparison of the results of two passes of emulation (in different orders) to detect a class of bugs that are particularly hard to find: bugs caused by optimizer errors and user bugs that manifest themselves only in the optimized executable.
Original languageEnglish (US)
U.S. patent number6263489
StatePublished - Jul 17 2001

Fingerprint

Dive into the research topics of 'Method and apparatus for debugging of optimized code'. Together they form a unique fingerprint.

Cite this