title: Make gdb display assembly instructions instead of C
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/589653/switching-to-assembly-in-gdb">Switching to assembly in gdb</a>  </p>
  </blockquote>
  
  
  
  <p>I am debugging some code in gdb. When I run the <code>ni</code> (for <i>next instruction</i>) command, it displays the C code. Displaying the executed assembly instructions would make more sense to me.</p>
  
  <pre><code>(gdb) ni
  0x0804845a  28          tmp = *lpp;
  (gdb) ni
  0x0804845c  28          tmp = *lpp;
  (gdb) ni
  0x0804846a  29          **lpp = (unsigned long) &amp;buf;
  (gdb) ni
  0x0804846c  29          **lpp = (unsigned long) &amp;buf;
  </code></pre>
  
  <p>Is there any way to make gdb display the assembly code instead, without calling <code>disassm</code> every time?</p>
  
  <p><strong>EDIT:</strong> I know about the <code>layout asm</code> command which displays the code in a readline window. I would like to see the disassembly on the gdb commandline, not in a gdb window.</p>