DOCUMENT:Q105275  05-NOV-1999  [win16sdk]
TITLE   :Using the "BR" Command in WDEB386.EXE
PRODUCT :Microsoft Windows Software Development Kit
PROD/VER:WINDOWS:3.0,3.1
OPER/SYS:
KEYWORDS:kb16bitonly

======================================================================
-------------------------------------------------------------------------------
The information in this article applies to:

 - Microsoft Windows Software Development Kit (SDK) versions 3.0, 3.1 
-------------------------------------------------------------------------------

SUMMARY
=======

The "BR" command in WDEB386.EXE uses the debug registers of the Intel 386 and
above processors to break into the debugger on memory accesses. These accesses
can be in byte, word, or dword sizes involving a read, write, or execute
instruction. Because the BR command is very specific as to the type of memory
access it will trap, care must be taken to choose the correct combination of BR
settings in order to obtain all possible cases:

   E == execute access
   W == write access
   R == read access

   1 == byte sized access
   2 == word sized access
   4 == dword sized access

When a break into the debugger is required when a memory location is modified,
set a few BR breakpoints on a Write operation giving the three different operand
sizes:

   BR W1 seg:off
   BR W2 seg:off
   BR W4 seg:off

This should cover all possible cases of the memory being touched.

Additional query words: 3.10 no32bit 3.00 breakpoint br

======================================================================
Keywords          : kb16bitonly 
Technology        : kbAudDeveloper kbWin3xSearch kbSDKSearch kbWinSDKSearch kbWinSDK300 kbWinSDK310
Version           : WINDOWS:3.0,3.1

=============================================================================

THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS
PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND.  MICROSOFT DISCLAIMS
ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  IN NO
EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR
ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL,
CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF
MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.  SOME STATES DO NOT ALLOW THE EXCLUSION
OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES
SO THE FOREGOING LIMITATION MAY NOT APPLY.

Copyright Microsoft Corporation 1999.