title: gdb error message: DW_OP_reg, DW_OP_piece, and DW_OP_bit_piece
body: <p>I'm debugging somebody else's Qt program and ran into the following error message which I don't understand:</p>
  
  <pre><code>DWARF-2 expression error: DW_OP_reg operations must be used either alone or in
  conjuction with DW_OP_piece or DW_OP_bit_piece.
  </code></pre>
  
  <p>I'm not sure what that means and Google isn't of much help.</p>
  
  <p>Here's the context - <code>sLocation</code> is a <code>QString</code> that was declared a few lines earlier. However, it was created from functions which were inlined, so I'm not sure of its value and am attempting to check before being appended to:</p>
  
  <pre><code>(gdb) printqstring suffix
  (QString)0xffffbd80: "sorted"
  (gdb) next
  1241        sLocation += suffix;
  (gdb) printqstring sLocation
  Can't take address of "sLocation" which isn't an lvalue.
  (gdb) info local
  sLocation = &lt;error reading variable sLocation (DWARF-2 expression error:
      DW_OP_reg operations must be used either alone or in conjuction with
      DW_OP_piece or DW_OP_bit_piece.)&gt;
  </code></pre>
  
  <p>Could somebody please explain what that error message means or what could cause it?</p>