Browse Prior Art Database

Debug Code Groups Disclosure Number: IPCOM000010719D
Original Publication Date: 2003-Jan-15
Included in the Prior Art Database: 2003-Jan-15
Document File: 6 page(s) / 261K

Publishing Venue



This invention allows the user to add code directly to a compiled program in the debugger and continue to debug the program without exiting the debugger, and have the change go into effect immediately.

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 33% of the total text.

Page 1 of 6

Debug Code Groups

The basic idea is that this invention allows the user to insert code fragments into a section of program code that is actively being debugged. The code is inserted by replacing an opcode in the statement before which the code is to be run. The debugger then will take the inserted code and using the information in it's symbol table along with a language processor (or extended expression evaluator), generate a snippet of inserted code that can be executed to implement the lines of code that where added. In some embodiments this snippet of code may be actual machine instructions while in other embodiments this snippet may be an interpreted pseudo code that is normally generated for the purposes of evaluating expressions.

While more advanced environments may allow the user just to edit the source code freely and apply changes, this would require a fairly complex "before and after" analysis of the source code in order to determine where to add the sections. Rather than take this approach this invention uses a structured input technique that allows users to input sections of code or update statements in a structured way that still allow users to make and save all the changes they need to make. The user is allowed to do this while in a debug environment without the need to recompile or even rerun the program because once committed, the changes immediately take affect. While this mode may not offer all the flexibility of editing the program within an language sensitive editor, it does offer a large degree of flexibility, and more than enough flexibility to make changes to code while debugging.

Consider the following debugger program screen:


Page 2 of 6

The user is now stopped at line 65 and realizes that more code is need after line 61 in order to initialize the remaining fields of ptr1->moreStuff. To do this the user simply places the cursor after line 61 and presses enter and gets another line to add new text:


[This page contains 203 pictures or other non-text objects]

Page 3 of 6

The user then enters the missing code correcting the problem, in this example inserting ptrl->morestuff->v=2100, as line 62 and ptrl->morestuff->m=20, as line 63, brings up a context menu and selects the Commit Changes to PGM operation to have the code snippet generated and the changes instantly take affect.

There are three primary forms of structured inputs, they are: updates, inserts, and deletes.

Updates are when single line/statement of code is modified. With updates, the statement which is updated has a special breakpoint set on it and a code snippet associated with it. When breakpoint is hit, the code snippet is run to affectively emulate the updated statement, and control SKIPS to a next statement(s) which is specified by the compiler in a special table within the debug data. (Effectively not running the statement that the breakpoint is set on.)


[This page contains 203 pictures or other non-text objects]

Page 4 of 6

Inserts are e...