Whatsnew
Whatsnew
0
Here is a quick tour of the new features in SoftICE 3.0.
SoftICE 3.0 is available separately for Windows 95 and Windows NT. Many enhancements apply to both
versions of SoftICE. In addition, many new features are now available to Windows 95 users that were previously
only available in the Windows NT version of SoftICE.
Contents
What's New For All SoftICE Users
SoftICE Symbol Loader
Quick Start to Debugging
Pre-Loading Symbols and Source Code for Device Driver Debugging
Using Translation Options
Choosing the "Package Source…" Option
Using Symbol Loader from the Command Line
Using NMSYM to Automate Translation and Loading
Locals and Structures Support
Using the Locals Window
Using Local Variables in Conditional Expressions
Using the Watch Window
Mouse Support
New and Enhanced Commands for All Users
What's New For Windows 95 SoftICE Users
New and Enhanced Commands for Windows 95 Users
Using the New Expression Evaluator
· Locals and Structures support shows your data the way you understand it
· New commands provide more system visibility: CPU, FIBER, PCI, PEEK and POKE
· Comprehensive on-line manuals help you take advantage of the power of SoftICE
2) Choose File-Open Module, and select the module you want to debug.
3) Choose Module-Load (or click the Load button on the toolbar). SoftICE automatically extracts symbol
information from your module, creates a .NMS file containing the information, loads the symbols and source
code, and, if you are loading an EXE file, loads the EXE and sets a breakpoint. You're ready to start debugging.
2) Choose Module-Settings, and select the Translation page. Check "Package source with symbol table."
3) Choose Module-Translate (or click the Translate button) to create a .NMS symbol file.
4) Choose Edit-SoftICE Initialization Settings, and select the Symbols page. Add your .NMS file to the list.
5) Restart your system. Your symbols and source code will automatically be loaded with SoftICE.
SoftICE no longer supports loading .SYM files directly at initialization time. Use Symbol Loader to convert .SYM
files to .NMS format. Your translation options determine if your .NMS file includes source code.
· Publics only
This option provides public (global) symbol names. Your .NMS file will not include statics, locals, type
information or source code. This option uses the least amount of symbol memory.
This option includes global, static and local symbols, as well as type information. Source code and line
numbers are not included. This produces smaller symbol tables.
This option includes all available debugging information, include source code and line number information.
· Using NMS symbol information to pre-load symbols and source (i.e. LOAD= ).
SoftICE does not attempt to locate source information at start up. If you need to have source code
loaded for a .VxD or Windows NT device driver, then you must choose the Package Source option.
· Convenience or efficiency when packaging a module for debugging on a system that does not have access
to your source files, or when you plan to reload frequently between recompiles.
If you use the Package option, your source code is attached to the .NMS file. You probably do not want to
distribute your .NMS file or leave it in a place that is accessible to non-employees of your company.
/TRANSLATE · Perform the default translation for the module-type, or if settings exist, use those
settings.
/LOAD · Perform the default translation (if required) and perform the default load for the
module-type. If settings exist, they will be used for both translation and load.
/EXPORTS · Load exports for a file.
/LOGFILE · Create a log file.
/PACKAGE · Turns on source packaging for file-name specified. Ignored if no file-name is used.
/NOPROMPT · Turns off source prompting for file-name specified. Ignored if no file-name is used.
You may specify both TRANSLATE and LOAD as options (only required if you want to *force* a symbol file to
translated), but all other options are mutually exclusive.
NMSYM provides two complimentary sets of functionality analogous to the SoftICE Symbol Loader
(Loader32.exe). The primary functionality allows you to set all the parameters related to translating and loading
symbol information for an individual module. The secondary functionality allows you to automate the loading or
unloading groups of symbol tables or module exports. Also included is the ability to obtain product version
information and save the SoftICE history log.
Refer to Using SoftICE in the on-line documentation for a full description of NMSYM. For quick help on NMSYM
command syntax and usage, run:
NMSYM /HELP
The new SoftICE Loader extracts enhanced type information from your module's debug information, creating a
file in NuMega 32 bit symbol format (NM32). Files in this format have the extension .NMS. SoftICE supports the
following debug formats: PDB, 16-bit and 32-bit Codeview, 32-bit Borland (including Delphi), COFF and SYM.
The SoftICE Expression evaluator uses type information to provide enhanced functionality. This includes the
ability to cast to a type, indirect through class and structure types, take the address of a class or structure
member, perform symbol lookups on local and global symbols, and display variables in type format.
When using local variables in conditional expressions, it is important to remember that functions typically have a
prologue where local variables are created, and an epilogue where they are destroyed. Local variables are not
accessible until the prologue code has completed execution, and are also inaccessible once the epilogue code
begins executing. Because of the adjustments to the stack frame during execution of the prologue and epilogue
code, function parameters are also temporarily inaccessible using symbol names.
These issues are easily worked around by setting the breakpoint on the first or last source code line within the
function body.
Example:
For the function foobar source code lines 1 and 2 are outside the function body. This is where the prologue
code is executed. Attempting to use a local variable or parameter at this point will result in a symbol not found
error as follows:
Instead of setting the conditional breakpoint on the function name or source code line 1 or 2, set the conditional
on source code line 3 where the local variable fooTmp is declared and initialized:
:BPX .3 if (foo==0)
Source code line 13 marks the end of the function body, and is where the epilogue code begins execution. At
this point, local variables and parameters are considered to be out of scope. To set a conditional at the end of
the function, use source line 12:
Mouse Support
Select your mouse type at install-time, or change it later with Mouse Setup. Options are Serial (COM1 or
COM2, Microsoft-compatible mouse only), PS/2 or None. Double-click is only supported for Pentium-class
machines.
Note: The mouse is not supported if you are using SoftICE from a second PC with the SERIAL.EXE utility.
Use SET MOUSE [on | off] to enable or disable the SoftICE mouse at run-time. Use SET MOUSE ON [1|2|3] to
adjust the speed of mouse movements (1=slow, 2=normal, 3=fast).
· Set breakpoints in the Code window. Double-click sets or clears a breakpoint (Pentium only). Single click
selects a line, then use F7 or HERE command to execute to that line.
· Right click to display a context menu of frequently used functions such as Copy, Paste, Unassemble,
Display and What. You can point at a function name and select Unassemble to show the code for that
function. Then use the Previous command to go back to the code window originally displayed. Point at a
data item and press What to identify what the item is, or press Display to dump the item to the data
window. The Previous command restores the data window to its prior state.
· Double-click to expand or collapse structures in the Locals and Watch windows (Pentium only).
· Scroll Command, Code, Locals, Watch and Data windows by clicking on the scroll arrows.
:types
Size Type Name Typedef
0x0004 ABORTPROC int stdcall (*proc) ( void )
0x0004 ACCESS_MASK unsigned long
0x0004 ACL_INFORMATION_CLASS int
0x0018 ARRAY_INFO struct ARRAY_INFO
0x0002 ATOM unsigned short
0x0048 BALLDATA struct _BALLDATA
0x0048 _BALLDATA struct _BALLDATA
0x0020 _BEZBUFFER struct _BEZBUFFER
0x0004 BOOL int
0x0001 BOOLEAN unsigned char
0x0010 _BOUNCEDATA struct _BOUNCEDATA
0x0004 BSTR unsigned short *
:types _bouncedata
typedef struct _BOUNCEDATA {
public:
void * hBall1 ;
void * hBall2 ;
void * hBall3 ;
void * hBall4 ;
};
For Windows 95, we updated SoftICE with many features that first appeared in the Windows NT version.
Highlights include:
· Macros
· New WHAT command to analyze names or expressions to determine if they are a "known" type
The SoftICE expression evaluator parses and evaluates expressions in a manner very similar to how a ‘C’ or
‘C++’ language compiler translates an expression. Multiple operators, operands, and expressions can be
combined to create compound expressions for conditional breakpoints, or expression evaluation:
The following example uses a compound expression to trigger a breakpoint if the first parameter (ESP+4)
passed to the IsWindow() API function is an HWND with the value of 0x10022 or 0x1001E. If either of the two
expressions is TRUE, the conditional expression will be TRUE, and the breakpoint will trigger.
Operator Precedence
Operator precedence within the SoftICE expression evaluator is equivalent to ‘C’ operator precedence, with the
addition of the special SoftICE operators. This is a change from previous SoftICE expression evaluators which
evaluated all basic operators as having equal precedence and left-to-right associativity.
Operator precedence drastically affects the original SoftICE indirection operator ‘@’ which was always
evaluated after all other operators had been evaluated. Expressions such as @ebp+8, or @ebp-4 no longer
evaluate as you may expect, because the indirection operator ‘@’ has a higher precedence than the ‘+’
operator. You need to use parentheses to force the addition to be evaluated first: @(ebp+8) or @(ebp-4).
NOTE: Since the use of parentheses can be somewhat cumbersome for simple indirection’s, use the new ‘->’
operator to perform the same evaluation. For example, ebp->8 or ebp->-4.
Refer to Using SoftICE for a complete discussion of the expression evaluator and how to use it.