title: Setting breakpoints by address in shared libraries with GDB
body: <p>How can I set a breakpoint in a shared library by address?  Let's say I disassemble a library and find an instruction I want to break at, but the instruction is not associated with a label:</p>
  
  <p>$ objdump -d libFoo.so</p>
  
  <p>...</p>
  
  <pre><code>bc29a:       48 89 f5                mov    %rsi,%rbp
  </code></pre>
  
  <p>...</p>
  
  <p>What is the best way to convert the ELF file address (bc29a) to the correct virtual address after the library has been loaded?  And how can this information be conveyed to GDB?</p>
  
  <p>Thanks for any help.</p>