Browse Prior Art Database

Method of Causing a Software Trap on a Branch Target Address

IP.com Disclosure Number: IPCOM000112283D
Original Publication Date: 1994-Apr-01
Included in the Prior Art Database: 2005-Mar-27
Document File: 2 page(s) / 41K

Publishing Venue

IBM

Related People

Mealy, BG: AUTHOR [+3]

Abstract

An important problem in software development is debugging code. A useful method for debugging code is to set up breakpoints so that a program runs to a certain address and then stops.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 74% of the total text.

Method of Causing a Software Trap on a Branch Target Address

      An important problem in software development is debugging code.
A useful method for debugging code is to set up breakpoints so that a
program runs to a certain address and then stops.

      A difficult problem arises, however, when the program gets to a
section of code which it is not supposed to execute.  It is possible
to set breakpoints in this section of code, but it can be difficult
to determine how the program got to that code in the first place.

      It is possible for processor implementations to give hardware
support for breakpoint modes.  Typically, there are some control
registers used to determine whether or not the processor is in
breakpoint mode, and an address register to tell the processor at
which address it should stop.  When the processor encounters a
breakpoint, it will typically save the machine state and branch to a
handler.

      Using these same registers, with an additional mode, we can
assist the software developer further, by introducing a branch target
breakpoint mode.  In this mode, the programmer specifies a branch
target breakpoint (in the same register as the address breakpoint
would be specified), which is then used by the processor to break at
a branch instruction which has that address as a target.

      Now if the programmer wants to solve the problem of deviant
code which branches to an unexpected address, he/she can set a branch
target addres...