title: GDB - What is the mysterious Assembly code?
body: <pre><code>Dump of assembler code for function main:
     0x0804833e &lt;+0&gt;:     push   %ebp
     0x0804833f &lt;+1&gt;:     mov    %esp,%ebp
     0x08048341 &lt;+3&gt;:     sub    $0x8,%esp
     0x08048344 &lt;+6&gt;:     and    $0xfffffff0,%esp
     0x08048347 &lt;+9&gt;:     mov    $0x0,%eax
     0x0804834c &lt;+14&gt;:    add    $0xf,%eax
     0x0804834f &lt;+17&gt;:    add    $0xf,%eax
     0x08048352 &lt;+20&gt;:    shr    $0x4,%eax
     0x08048355 &lt;+23&gt;:    shl    $0x4,%eax
     0x08048358 &lt;+26&gt;:    sub    %eax,%esp
  =&gt; 0x0804835a &lt;+28&gt;:    movl   $0x10,-0x4(%ebp)
     0x08048361 &lt;+35&gt;:    movl   $0x0,-0x8(%ebp)
     0x08048368 &lt;+42&gt;:    pushl  -0x4(%ebp)
     0x0804836b &lt;+45&gt;:    call   0x8048334 &lt;myfunc1 at test.c:4&gt;
     0x08048370 &lt;+50&gt;:    add    $0x4,%esp
     0x08048373 &lt;+53&gt;:    pushl  -0x8(%ebp)
     0x08048376 &lt;+56&gt;:    call   0x8048339 &lt;myfunc2 at test.c:8&gt;
     0x0804837b &lt;+61&gt;:    add    $0x4,%esp
     0x0804837e &lt;+64&gt;:    mov    $0x0,%eax
     0x08048383 &lt;+69&gt;:    leave
     0x08048384 &lt;+70&gt;:    ret
  End of assembler dump.
  (gdb) info line
  Line 16 of "test.c" starts at address 0x804835a &lt;main+28 at test.c:16&gt; and ends at 0x8048361 &lt;main+35 at test.c:17&gt;.------------------------------------(1)
  (gdb) shell cat test.c
  #include&lt;stdio.h&gt;
  
  void myfunc1(int recv_arg1)
  {
          /* does nothing */
  }
  void myfunc2(int recv_arg1)
  {
     /* does nothing */
  }
  
  int main(int argc,char **argv)
  {
          int var1;
          int var2;
          var1 = 16;
          var2 = 0;
          myfunc1(var1);
          myfunc2(var2);
          return 0;
  }
  </code></pre>
  
  <p>Note  in (1) that the asm code for main is within that range !! and the asm code before this range is for something else ? What ? surely something mysterious !!  </p>