DDC-I Logo

Sitemap  

DDC-I Ada Compiler System  
Saving and Restoring Debugger State

Product Family: SCORE
Target CPU: PC/Windows, SPARC/Solaris, 1750A, 80x86, PowerPC
Language: Ada, C, Fortran
Host: PC/Windows, Sparc/Solaris

It’s been a long day, trying to chase down a bug. You haven’t found the bug, but now it’s time to go home and you need to shut down. But what about the work you’ve done? You have spend a lot of time setting up tracepoints and breakpoints with conditions and attached subprograms at just the right places to help you debug. You’ve temporarily disabled some of the breakpoints and tracepoints. You’ve set up a set of registers and expressions to watch. You’ve changed the default bases for display to be what you need. When you shut down you’ll loose all of this and will have to redo all of this when you come back to work and resume trying to find the bug. And if you’re like most of us, you won’t be able to remember all of the things that need to be done just go get things set up like they were.

The SCORE debugger has a solution that we call "save and restore state". This feature is present with the SCORE debugger in SCORE releases 2.4g and later.

When you are ready to shut down, bring up the debugger command window. This can be done by clicking on the icon that looks like ">_" in the toolbar for debugger windows or going to the "Debug" menu, selecting "Windows...", checking the box for "Command" and then clicking on "OK". The upper part of the window will show a history of recently executed commands. The lower part allows you to enter commands for the debugger. Enter the command "SAVE STATE " without quotes and with being the full path name for a file where you would like to save the current state information. In response to this command the debugger will create a debugger subprogram that will create any currently existing breakpoints and tracepoints, disable those that are currently disabled, set up watches for the registers or expressions currently being watched, and save set the base and size environment information to what is currently in effect. You can then exit the debugger and shut down. Note that when using GUI mode debugging, it is important to use the full path name for the file for otherwise it will be written in what the main part of the debugger perceives as the "current directory" which may not be what you expect.

When you return to resume debugging your application, you will have to start your application from the beginning. However, you can easily reset your tracepoints, breakpoints, watched registers, watched expressions, base and size information just by executing the debugger subprogram when you shut down. There are several ways you can do this. If you are debugging in the sequential mode you can enter the command "RESTORE STATE " where the filename is the one you specified when you shut down. If you are debugging in the GUI mode, the simplest thing to do is to go do the "Debug" menu, and then to "Subprograms - Execute Subprogram..." menu choice. Enter the or browse to the file and click "OK". (There are no parameters.) The state items previously saved will be restored.

Note that since the file to restore state is a debugger subprogram, it is a text file that you can edit if you wish. Also, you do not have to execute the subprogram immediately when you start the debugger, but can do so at any time that is appropriate.

 

Contact
602-275-7172
sales@ddci.com

IDIQ Contract Vehicles:
--------------
AMCOM Express
DESP II
F2AST
R23G

Links

Support

Members Area
    -Member Login/Return
    -Login Help

Atlas Support Packages
    -Atlas Premium
    -Atlas Advantage
    -Atlas Choice

Complimentary Support

Submit a Software Trouble Report

Customer Quote:
"You have talented and dedicated people working for you. They are superlative. DRS appreciates their efforts and I personally am most grateful to be working with such an excellent group."