title: The ba command (Break on Access) in WinDbg is not working as advertised in the book Advanced Windows Debugging by Daniel Pravat and Mario Hewardt
body: <p>I am reading the book <a href="https://rads.stackoverflow.com/amzn/click/com/B004Y4UTF4" rel="nofollow noreferrer" rel="nofollow noreferrer">Advanced Windows Debugging: Developing and Administering Reliable, Robust, and Secure Software</a> by Daniel Pravat and Mario Hewardt. I have questions about Chapter 2.</p>
  <p>I am using WinDBG 10.0.19041.1 X86 on Windows 10 Pro Version 2004 build 19041.572. I built 02sample.exe with Microsoft Visual Studio Community 2019 Version 16.7.6 with the GenerateDebugInformation property set to DebugFull. I am debugging the Debug|x86 configuration of 02sample.exe.</p>
  <p>I am reading the section in chapter 2 named <strong>Setting a Breakpoint on Access</strong> and I am seeing differences between what is in the book and what I am experiencing.</p>
  <p>The first difference in behavior is with the following command.</p>
  <pre><code>0:000&gt; dt gGlobal
  </code></pre>
  <p>This command fails with the following error.</p>
  <pre><code>Symbol gGlobal not found.
  </code></pre>
  <p>The following command does work.</p>
  <pre><code>0:000&gt; dt 02sample!gGlobal
  *** WARNING: Unable to verify checksum for 02sample.exe
  gGlobal
     +0x000 m_ref            : 0n0
  </code></pre>
  <p>The next difference in behavior is with the following command.</p>
  <pre><code>0:000&gt; ba w4 gGlobal+0
  </code></pre>
  <p>Based on the following output, this appears to work.</p>
  <pre><code>0:000&gt; bl
       0 e Disable Clear  00969130 w 4 0001 (0001)  0:**** 02sample!gGlobal
  </code></pre>
  <p>However, the breakpoint is not being hit. I cannot figure out why.</p>