Method for testing a computer program
AssigneeRobert Bosch GmbH
InventorsChristopher Huth, Max Camillo Eisele
Life of this patent
Estimating the term…
Abstract
A method for testing a computer program. The method includes executing the computer program until a subprogram is called, ascertaining a memory location of the call stack in which the return address or the stack base pointer of the called subprogram is stored, setting a watchpoint on the ascertained memory location, setting breakpoints on return instructions of the called subprogram, continuing the execution of the computer program and indicating that the computer program has an error if the set watchpoint has been triggered before one of the set breakpoints due to a write to the memory location.
Claims10
A method for testing a computer program, comprising the following steps:
- executing the computer program until a subprogram of the computer program is called;
- ascertaining a memory location of a call stack in which a return address of the called subprogram or a stack base pointer of the called subprogram is stored;
- setting a watchpoint on the ascertained memory location;
- setting breakpoints on return instructions of the called subprogram;
- continuing the execution of the computer program;
- and
- indicating that the computer program has an error when the set watchpoint has been triggered before one of the set breakpoints is triggered due to a write to the memory location.
A test arrangement configured to test a computer program, the test arrangement comprising:
- a computer;
- and
- a non-transitory computer-readable medium on which instructions are stored for testing a computer program, the instructions, when executed by the computer, causing the computer to perform the following steps including:
- executing the computer program until a subprogram of the computer program is called;
- ascertaining a memory location of a call stack in which a return address of the called subprogram or a stack base pointer of the called subprogram is stored;
- setting a watchpoint on the ascertained memory location;
- setting breakpoints on return instructions of the called subprogram;
- continuing the execution of the computer program;
- and
- indicating that the computer program has an error when the set watchpoint has been triggered before one of the set breakpoints is triggered due to a write to the memory location.
A non-transitory computer-readable medium on which instructions are stored instructions for testing a computer program, the instructions, when executed by a processor, causing the prcessor to perform the following steps:
- executing the computer program until a subprogram of the computer program is called;
- ascertaining a memory location of a call stack in which a return address of the called subprogram or a stack base pointer of the called subprogram is stored;
- setting a watchpoint on the ascertained memory location;
- setting breakpoints on return instructions of the called subprogram;
- continuing the execution of the computer program;
- and
- indicating that the computer program has an error when the set watchpoint has been triggered before one of the set breakpoints is triggered due to a write to the memory location.
Dependencies are inferred from the claim text.