title: How to add comments to gdb output?
body: <p>When debugging Windows application with Ollydbg, we can add comments to assembly language output as following:</p>
  
  <pre><code>00401020   push        ebp    ; add comment here
  </code></pre>
  
  <p>Can we add comments to gdb output just like the way above?</p>
  
  <p>When we input <code>disassemble</code> in gdb, it shows like this:</p>
  
  <pre><code>(gdb) disassemble main 
  Dump of assembler code for function main:
     0x0804841d &lt;+0&gt;: push   %ebp
     0x0804841e &lt;+1&gt;: mov    %esp,%ebp
     0x08048420 &lt;+3&gt;: and    $0xfffffff0,%esp
     0x08048423 &lt;+6&gt;: sub    $0x10,%esp
     0x08048426 &lt;+9&gt;: movl   $0x80484d0,(%esp)
     0x0804842d &lt;+16&gt;:    call   0x80482f0 &lt;puts@plt&gt;
     0x08048432 &lt;+21&gt;:    mov    $0x0,%eax
     0x08048437 &lt;+26&gt;:    leave  
     0x08048438 &lt;+27&gt;:    ret    
  End of assembler dump.
  </code></pre>
  
  <p>Can we add some comments line <strong>0x0804841d</strong> in order that gdb output like this:</p>
  
  <pre><code>(gdb) disassemble main 
  Dump of assembler code for function main:
     0x0804841d &lt;+0&gt;: push   %ebp    ; add comment here
     0x0804841e &lt;+1&gt;: mov    %esp,%ebp
     0x08048420 &lt;+3&gt;: and    $0xfffffff0,%esp
     0x08048423 &lt;+6&gt;: sub    $0x10,%esp
     0x08048426 &lt;+9&gt;: movl   $0x80484d0,(%esp)
     0x0804842d &lt;+16&gt;:    call   0x80482f0 &lt;puts@plt&gt;
     0x08048432 &lt;+21&gt;:    mov    $0x0,%eax
     0x08048437 &lt;+26&gt;:    leave  
     0x08048438 &lt;+27&gt;:    ret    
  End of assembler dump.
  </code></pre>