title: How to set module breakpoint (bu) in WinDbg for operator new/operator delete?
body: <p>Here is my problem:</p>
  
  <pre><code>0:001&gt; x xerces_depdom_2_8!xercesc_2_8::DOMStringHandle::operator*
  00000000`06645e10 xerces_depdom_2_8!xercesc_2_8::DOMStringHandle::operator delete (void *)
  00000000`06645be0 xerces_depdom_2_8!xercesc_2_8::DOMStringHandle::operator new (unsigned int)
  0:001&gt; bu "xerces_depdom_2_8!xercesc_2_8::DOMStringHandle::operator delete"
  0:001&gt; bu "xerces_depdom_2_8!xercesc_2_8::DOMStringHandle::operator new"
  breakpoint 0 redefined
  0:001&gt; bu xerces_depdom_2_8!xercesc_2_8::DOMStringHandle::operator delete
  Couldn't resolve error at 'xerces_depdom_2_8!xercesc_2_8::DOMStringHandle::operator delete'
  0:001&gt; bu xerces_depdom_2_8!xercesc_2_8::DOMStringHandle::operator\ delete
  Couldn't resolve error at 'xerces_depdom_2_8!xercesc_2_8::DOMStringHandle::operator\ delete'
  </code></pre>
  
  <p>First I try to quote the function name. No dice - trying to set a breakpoint on the <code>operator new</code> removes the one on <code>operator delete</code>. Meaning, the breakpoints are set incorrectly in the first place.</p>
  
  <p>Unquoted tries do not work too.</p>
  
  <p>So, how do I do it?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>There is a reason I want to use bu, rather than bp. The breakpoints are set in a script. Using actual addresses for breakpoints is not a good idea, because they might change from run to run, unlike the function names. Besides, bu allows to set the breakpoint before the respective module is loaded, again unlike bp.</p>
  
  <p>So, let me clarify the question - breakpoints are set before the respective modules are loaded.</p>