title: How to compare a stored string variable in GDB?
body: <p>I have a variable called x in GDB which I want to compare against a string.</p>
  
  <pre><code>gdb $ print $x
  $1 = 0x1001009b0 "hello"
  </code></pre>
  
  <p>but a comparsion with </p>
  
  <pre><code>if $x == "hello"
  </code></pre>
  
  <p>doesn't work.</p>