×

Method and apparatus for debugging of optimized code using emulation

  • US 6,434,741 B1
  • Filed: 04/30/1998
  • Issued: 08/13/2002
  • Est. Priority Date: 04/30/1998
  • Status: Expired due to Fees
First Claim
Patent Images

1. 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.

View all claims
  • 3 Assignments
Timeline View
Assignment View
    ×
    ×