Debugger

The following debugger features are new for Visual C++ 6.0.

AfxDumpStack for Diagnosing Field-Installed Applications

The AfxDumpStack function generates an image of the current stack and dumps that image to the debug output device (for example, afxDump). This feature provides a mechanism with which you can get diagnostic information even if the debugger is not installed on the end user's machine. It can be used in debug and non-debug versions of the MFC libraries.

Edit and Continue

Edit and Continue allows you to incorporate common, simple edits during a debugging session without having to quit the session, rebuild, and restart the debugger. Changes are recompiled and applied to the executing application in memory.

GetLastError() Value Displayed as Register

This is a new pseudo-register called ERR that displays the last error code for the current thread. This pseudo-register is not an actual hardware register, but is displayed as though it were a hardware register. It retrieves the same value as calling the GetLastError function. Using it in conjunction with the ,hr modifier produces very useful output, showing the error message corresponding to each error code. If this register is not found, you should prefix this register with an @ sign.

GUIDs Decoded for Display

Types based on GUIDS (including IIDs, CLSIDs, and REFIIDs) are displayed by name (if found in the registry), or failing that, in the normal GUID hex form.

Improved Disassembler Output (Undecorated Symbols)

The disassembly window and callstack window now undecorate C++ names where they did not before, such as when displaying system callstacks from Windows NT DBG files. You now see the C++ name with a proper argument list.

Improved V-Table and Function Pointer Display

Pointers to functions and v-table entries are now displayed symbolically wherever possible, including parameters. Previously, these items were displayed as just hex addresses in Visual C++ 5.0.

In-Process Remote Procedure Calls

RPC debugging now works with in-process remote procedure calls (RPCs), as well as out-of-process RPCs. See Debugging COM Clients and Servers Using RPC Debugging.

Load COFF & Exports Option

The new Load COFF & Exports option allows additional debugging information to be loaded when the standard CodeView format debugging information is not available. This option enables you to see some useful symbols in the call stack even when CodeView debug information is not available. This option is useful for seeing window messages, for WindowProcs and COM objects, and when marshalling is involved. See Using COFF-Format Information or DLL Exports.

dumpbin /headers: To see what types (formats) of debug information are in a DBG file, issue the command dumpbin /headers against that DBG file and search the output for the Debug Directories section. Then see whether there is an entry of type coff. Type cv refers to CodeView.

dumpbin /exports: If there is no CodeView or COFF debugging information available, (for example, when you are in Windows 95 system files, which don't have .dbg files), the Load COFF & Exports option converts the export table of each loaded DLL into a symbol. To see what sort of symbols this will add for a particular DLL, issue the dumpbin /exports command against that DLL file and examine the output. These DLL files are any 32-bit system DLLs; for example, Ole32.dll or Kernel32.dll. Issuing dumpbin /exports enables you to see the exact function name, so that you can set a breakpoint on that function. For example, MessageBoxA is an actual function name; you might see the function written as "MessageBox" elsewhere, but this output shows that the actual function name you need to set the breakpoint on is MessageBoxA. You can see the exact function name even if the name includes non-alphanumeric characters, such as a period or underscore.

MASM Hex Syntax Supported

The debugger now supports MASM-format hex numbers in expressions, such as 1234h. This can make operations involving the Disassembly window easier, such as viewing DataTips.

MMX Register Display

You can now display MMX registers in the Watch and Quickwatch windows using the symbols MM0-MM7. MMX registers are 64-bit integer registers and will be displayed on all x86 machines, whether they support the MMX instructions or not. See Modifying the Value of a Variable or Contents of a Register.

Module List Dialog Box

This new dialog box displays the address, name, path, and load order for all DLLs used by your program. You can use this dialog box to determine which DLL your program crashed in.

New Formatting Symbols

The following are new symbols for Watch variables: hr, st, mq, wm, and wc.

Thread Information Block

This is a new pseudo-register that displays the Thread Information Block (TIB, also known as a TEB) for the current thread. If this register is not found, you should prefix this register with an @ sign. For more information on the content of TIBs, see "Under the Hood," Microsoft Systems Journal May 96.

Variants Decoded for Display

Variants are automatically displayed in their correct form: integers are displayed numerically, BSTRs as strings, and so on. The type of the variant is also displayed.

Back to What's New Overview