Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Blinker 5.10 Online Reference - <b> numega softice/w debugger</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 NuMega SoftICE/W debugger
------------------------------------------------------------------------------
 Blinker includes full support for the NuMega SoftICE/W debugger (Windows 95
 and Windows NT) for debugging real, protected, dual mode and Windows
 programs on a SINGLE MACHINE. SoftICE/W resides at the lowest system level,
 so it can debug almost any program at the source level, including VxDs,
 device drivers and DOS protected mode programs.

 To use SoftICE/W with DOS real mode or protected mode programs, simply
 compile the appropriate modules to include debugging information, and then
 link with the CODEVIEW link script command. Once a .EXE with debugging
 information has been created, use the appropriate SoftICE/W symbol loader to
 load the debugging symbols into SoftICE/W, depending on your SoftICE/W
 version.

 The symbol loader with SoftICE/W for Windows 95/NT is NMSYM, so to load the
 symbols run

 NMSYM /TRANSLATE /LOAD:SYMBOLS <.EXE or .DLL name>

 The symbol loader with SoftICE/W for Windows 3.1 is WLDR.EXE, so to load the
 symbols run

 WLDR <.EXE name>.SYM
 A .SYM file will automatically be created. Do not use WLDR <.EXE name> with
 no extension, as DOS extended programs cannot currently be loaded at the
 same time as their symbols using WLDR.

 To enable the interception of the INT 3 debugging interrupt by SoftICE/W use
 the command 'I3HERE ON' at the SoftICE/W command line (pop up SoftICE/W
 using Ctrl D), or by including it in the INIT line in the SoftICE/W
 initialisation file WINICE.DAT. To add an INT 3 instruction to a C/C++
 program simply use the directive __ASM INT 3

 SoftICE/W will then automatically pop up when it encounters the INT 3 in
 your code or whenever Control D is pressed. In addition, it can be forced to
 pop up at the very start of the program by setting the value /DI3 in the
 BLINKER environment variable as described in the section below. SoftICE/W
 will then pop up on a far JMP to the very first line of the actual program,
 which can be stepped into with F8. For high level languages the command 'G
 MAIN' will take you to the start of the main program.

 If you use the SoftICE/W loader to load the actual DOS extended .EXE, the
 first code displayed is actually the Blinker DOS extender, which is still
 running in DOS real mode. You can step over the DOS extender code by
 locating the RETF instruction around offset 0F0h in the displayed code
 segment and then issuing a G 0F0 command. At the RETF instruction the DOS
 extender will have switched to protected mode, and will be returning to a
 call to the Blinker kernel initialisation at the start of the actual
 program.

 When debugging DOS extended programs, segments are not present when they are
 first accessed, and SoftICE will often step into the Windows or Blinker
 extender `not present' handlers, which can be confusing. Forcing all
 segments to be preloaded, i.e. loaded at startup, will prevent this from
 happening, although this should only be used for debugging purposes and not
 for any final versions. To force all segments (CODE and DATA) to be
 preloaded just add the following 4 lines to the end of the Blinker LNK
 script file and re-link:

 DEFBEGIN
    CODE PRELOAD
    DATA PRELOAD
 DEFEND
 For a more detailed explanation of the function of these commands please
 refer to their descriptions in the online help.

 SoftICE for Windows 95 notes

 Since Windows 95 typically runs with only one LDT (Local Descriptor Table),
 while DOS extended programs always allocate their own LDT at startup, there
 are two minor scenarios to watch out for and avoid when debugging under
 Windows 95. There are no such restrictions when debugging under Windows NT,
 since each task and DOS box is kept completely isolated.

 The first occurs if SoftICE/W is popped up using Ctrl D while it is outside
 of the DOS extended program. The active LDT will belong to Windows 95 rather
 than to the program, so all selectors will refer to Windows code and data,
 not to the program. As a result, any program symbol addresses will be
 incorrect or invalid, so should not be used for any actions such as
 displaying or modifying memory or setting breakpoints etc.

 The second occurs if a breakpoint is set in the DOS extended program and Alt
 Esc is then used to switch back to Windows 95 and run another program. In
 this case it is likely that SoftICE/W will fix up the breakpoint to use the
 Windows 95 LDT, rather than the extender LDT, causing a breakpoint somewhere
 else within Windows 95.

 Apart from avoiding these minor potential pitfalls under Windows 95,
 SoftICE/W is able to debug all types of Blinker linked programs on a single
 machine.

 Borland C/C++ notes

 Borland C/C++ uses a unique format for its symbol debugging information, so
 Blinker currently only supports source line number information and global
 variables with Borland C/C++.

 Support for full debugging information with Borland C/C++ is planned for a
 future update to Blinker.

 By default, Blinker will attempt to execute CVPACK.EXE to pack the debugging
 information, and will display an error if it is not found in the DOS PATH.
 The CVPACK utility comes with Microsoft Visual C++ 1.5, so if you own a copy
 of it, simply make sure it is in the PATH. If you do not own a copy of
 CVPACK, you can add the CVV 2 command to the link script to tell Blinker to
 use the older format for the debugging information, and which does not
 require CVPACK.

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson