Browse Prior Art Database

Method for Allowing Multiple Breakpoints on a Processor with a Single Breakpoint Address Register

IP.com Disclosure Number: IPCOM000016319D
Original Publication Date: 2002-Oct-18
Included in the Prior Art Database: 2003-Jun-21
Document File: 2 page(s) / 55K

Publishing Venue

IBM

Abstract

A method is disclosed that utilizes a single breakpoint address register to emulate multiple breakpoints. Breakpoints are an essential feature in software debugging tools. Some processor architectures, including the NP4GS3 model of the IBM PowerNP, only provide a single breakpoint address register that stores an instruction address at which the processor halts execution. When the processor is halted, an attached debugger can read and display the current state information of the processor allowing a programmer to test and identify problems in the software. This disclosure addresses the need for a debugger to set breakpoints on multiple instruction addresses when the target processor architecture only provides a single breakpoint address register, while using the minimum amount of processor resources to avoid interfering with the execution environment of the programmer.

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

Page 1 of 2

  Method for Allowing Multiple Breakpoints on a Processor with a Single Breakpoint Address Register

  A method is disclosed that utilizes a single breakpoint address register to emulate multiple breakpoints. Breakpoints are an essential feature in software debugging tools. Some processor architectures, including the NP4GS3 model of the IBM PowerNP, only provide a single breakpoint address register that stores an instruction address at which the processor halts execution. When the processor is halted, an attached debugger can read and display the current state information of the processor allowing a programmer to test and identify problems in the software. This disclosure addresses the need for a debugger to set breakpoints on multiple instruction addresses when the target processor architecture only provides a single breakpoint address register, while using the minimum amount of processor resources to avoid interfering with the execution environment of the programmer.

The proposed method utilizes a single instruction address to store a return instruction. When a debugger is attached to a processor, a return instruction is first stored at a specified location in the instruction address space and the address of that instruction is stored in the breakpoint address register. Each time a programmer sets a breakpoint on an instruction address, the debugger inserts a branch-and-return instruction in place of the programmer's instruction and stores the programmer's instruction in a table along with the address of the instruction. The branch-and-return instruction is assembled such that the target address of the branch is the address of the inserted return instruction. If the processor has cached the instruction where the programmer is setting the breakpoint at the time it is being set, or if the instruction is in the processor pipeline at that time, the processor must be forced to refetch the instruction and/or flush...