The inventive system and method determines the availability of spare registers in binary code for use by an instrument or program by conducting a local search of either the immediate block of program code or of successor blocks, depending upon where instrumenting code is to be inserted. When inserting code near the begining the of a block of code, the system checks for available registers within the current block of code after the intended insertion point. A register is considered available if the original program overwrites its contents in a statement succeeding the insertion point without first having read data from this register between the insertion point and the current program statement. The system logs all registers found to be available within the immediate block of code using this approach. When the insertion point is at or near the end of a block of code, the system checks all immediate successor blocks for available registers in the same manmer as for the single block case. The system then determines which registers are available, or overwritten without prior access, in all of the successor blocks and deems only these registers to be available to the inserted instrumenting code. The system thus assures that the use of registers by instrumenting code at an insertion point near the end of a code block is harmless to data needed by the main program regardless of where main program execution branches to after the current code block.

Das erfinderische System und die Methode stellt die Verwendbarkeit der Ersatzregister im binären Code für Gebrauch durch ein Instrument oder Programm, indem sie eine lokale Suche entweder des sofortigen Blockes des Programmcodes oder der Nachfolgerblöcke leiten fest und auf, wo instrumenting Code, ist eingesetzt zu werden abhängen. Wenn es Code nahe dem Begining von einem Block des Codes einsetzt, überprüft das System auf vorhandene Register innerhalb des gegenwärtigen Blockes des Codes nach dem beabsichtigten Einfügungpunkt. Einem Register gilt als vorhanden, wenn das ursprüngliche Programm seinen Inhalt in einer Aussage überschreibt, die zuerst dem Einfügungpunkt ohne gelesene Daten von diesem Register zwischen dem Einfügungpunkt und der Programmaussage zu haben folgt. Die Systemprotokolle, die alle Register fanden, um innerhalb des sofortigen Blockes des Codes mit dieser Annäherung vorhanden zu sein. Wenn der Einfügungpunkt oder nahe am Ende eines Blockes des Codes ist, überprüft das System alle sofortigen Nachfolgerblöcke auf vorhandene Register im gleichen manmer wie für den einzelnen Blockfall. Das System dann stellt fest, welche Register vorhanden sind, oder überschrieben ohne vorherigen Zugang, in allen Nachfolgerblöcke und meint nur diese Register, um für den eingesetzten instrumenting Code vorhanden zu sein. Zu das System folglich versichert, daß der Gebrauch von Registern durch instrumenting Code an einem Einfügungpunkt nahe dem Ende eines Codeblockes harmlos ist zu den Daten, die durch das Hauptprogramm benötigt werden unabhängig davon, wo Hauptablauf des Programms nachdem der gegenwärtige Codeblock sich ausbreitet.

 
Web www.patentalert.com

< (none)

< Adhesive bandage, matrix, and methods of removal

> Controlling access to a resource

> (none)

~ 00004