title: How to print the string a pointer points to while debugging using GDB?
body: <p>How do I inspect a string a pointer is pointing to when stepping through a program using GDB? </p>
  
  <p>I can see the a pointer is pointing to <code>0x82c6e10</code>. I know it is a string. How do I print it?</p>
  
  <p>Using <code>printf("%s\n", 0x82c6e10)</code> gives <code>Bad format string, missing '"'.</code> The fact that gdb does not complain of unknown command tells me that the solution is some variation of what I am doing. Am I right? I tried escaping the quotes but that did not help.</p>