Browse Prior Art Database

Register Return Hooking

IP.com Disclosure Number: IPCOM000086588D
Original Publication Date: 1976-Oct-01
Included in the Prior Art Database: 2005-Mar-03
Document File: 2 page(s) / 30K

Publishing Venue

IBM

Related People

Christian, UJ: AUTHOR [+4]

Abstract

Software monitors with an instruction hooking capability set hooks at the entry and exit points of subroutines. Many subroutines have multiple exits on a particular return register. Register return hooking solves the problem of hooking multiple exits of a subroutine.

This text was extracted from a PDF file.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 57% of the total text.

Page 1 of 2

Register Return Hooking

Software monitors with an instruction hooking capability set hooks at the entry and exit points of subroutines. Many subroutines have multiple exits on a particular return register. Register return hooking solves the problem of hooking multiple exits of a subroutine.

Some interrupt-driven software monitors receive control to collect statistics on every SVC, I/O, external or program check interrupt. If an instruction must be monitored that does not cause an interrupt, the monitor forces a program check interrupt, OC1, to occur by setting a hook on the instruction. The hook is set by overlaying the operation (OP) code of the instruction with an illegal OP code.

Hooks are often set at the entry and exit points of subroutines. A problem exits if the subroutine has numerous exit points or has conditional exit points, e.g., BCR 8, 14. If a subroutine returns on a particular general register, register return hooking can be used to alleviate this problem.

In register return hooking, a hook is set at the entry to the subroutine. When the monitor fields the interrupt that results from the hook, the monitor sets a hook at the storage address contained in the subroutine's return register. When the subroutine completes execution, the return register is used to return control to the calling routine. The monitor receives control when the return register hook is hit, collects the necessary data, restores the OP code of the instruction and returns control...