Patent ID: 6434741
Filing Date: 2002-08-13
Classification: G06F

Abstract:
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, said method comprising the steps of:a) deriving a table which associates each machine code instruction with a source construct for which it was generated; b) setting one or more breakpoints in said source code; c) determining at least one corresponding location for a breakpoint in said machine code through use of said table; d) executing, by emulation, only machine code instructions which correspond to source constructs that precede said breakpoint in said source code order to provide for a user, execution of a sequence of said machine code instructions in accordance with a sequence of corresponding source constructs; e) emulating the machine code instructions in the order in which instructions appear in the machine code; and f) comparing results of steps d) and e) and if a difference is detected in an effect produced by any emulated instruction, indicating a bug or an optimizer error.