title: Why does "gdb> disas /s main" not show me source code?
body: <p>I start with a binary executable and I want to see the source code, not just the assembly code. Is this possible?  The documentation at  &quot;https://sourceware.org/gdb/onlinedocs/gdb/Machine-Code.html&quot; seems to generate the source code.<br />
  If it is possible, why is the source code not showing.  I have set no breakpoints, the code is not striped. I have used the gdb command &quot;disas /s main&quot;.  A screen shot starting with some information about my configuration follow.</p>
  <pre><code>──(root㉿kali)-[/home/kali/Downloads]
  └─# uname -a
  Linux kali 5.15.0-kali3-amd64 #1 SMP Debian 5.15.15-2kali1 (2022-01-31) x86_64 GNU/Linux
                                                                                                                                                                                               
  ┌──(root㉿kali)-[/home/kali/Downloads]
  └─# gdb -v               
  GNU gdb (Debian 10.1-2) 10.1.90.20210103-git
  Copyright (C) 2021 Free Software Foundation, Inc.
  License GPLv3+: GNU GPL version 3 or later &lt;http://gnu.org/licenses/gpl.html&gt;
  This is free software: you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.
                                                                                                                                                                                               
  ┌──(root㉿kali)-[/home/kali/Downloads]
  └─# file RE1_64bit 
  RE1_64bit: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.24, BuildID[sha1]=8616e4f2a4a3c325c2a1f32b8ebb8366694f7a03, not stripped
                                                                                                                                                                                               
  ┌──(root㉿kali)-[/home/kali/Downloads]
  └─# gdb RE1_64bit 
  GNU gdb (Debian 10.1-2) 10.1.90.20210103-git
  Copyright (C) 2021 Free Software Foundation, Inc.                                                                                                                                            
  License GPLv3+: GNU GPL version 3 or later &lt;http://gnu.org/licenses/gpl.html&gt;
  This is free software: you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.
  Type &quot;show copying&quot; and &quot;show warranty&quot; for details.
  This GDB was configured as &quot;x86_64-linux-gnu&quot;.
  Type &quot;show configuration&quot; for configuration details.
  For bug reporting instructions, please see:
  &lt;https://www.gnu.org/software/gdb/bugs/&gt;.
  Find the GDB manual and other documentation resources online at:
      &lt;http://www.gnu.org/software/gdb/documentation/&gt;.
  
  For help, type &quot;help&quot;.
  Type &quot;apropos word&quot; to search for commands related to &quot;word&quot;...
  Reading symbols from RE1_64bit...
  (No debugging symbols found in RE1_64bit)
  (gdb) disas /s main
  Dump of assembler code for function main:
     0x000000000040084e &lt;+0&gt;:     push   %rbp
     0x000000000040084f &lt;+1&gt;:     mov    %rsp,%rbp
     0x0000000000400852 &lt;+4&gt;:     sub    $0x40,%rsp
     0x0000000000400856 &lt;+8&gt;:     mov    %edi,-0x34(%rbp)
     0x0000000000400859 &lt;+11&gt;:    mov    %rsi,-0x40(%rbp)
     0x000000000040085d &lt;+15&gt;:    cmpl   $0x2,-0x34(%rbp)
     0x0000000000400861 &lt;+19&gt;:    je     0x400886 &lt;main+56&gt;
     0x0000000000400863 &lt;+21&gt;:    mov    -0x40(%rbp),%rax
     0x0000000000400867 &lt;+25&gt;:    mov    (%rax),%rax
     0x000000000040086a &lt;+28&gt;:    mov    %rax,%rsi
     0x000000000040086d &lt;+31&gt;:    mov    $0x4009a2,%edi
     0x0000000000400872 &lt;+36&gt;:    mov    $0x0,%eax
     0x0000000000400877 &lt;+41&gt;:    call   0x400580 &lt;printf@plt&gt;
     0x000000000040087c &lt;+46&gt;:    mov    $0x1,%edi
     0x0000000000400881 &lt;+51&gt;:    call   0x4005e0 &lt;exit@plt&gt;
     0x0000000000400886 &lt;+56&gt;:    mov    -0x40(%rbp),%rax
     0x000000000040088a &lt;+60&gt;:    add    $0x8,%rax
     0x000000000040088e &lt;+64&gt;:    mov    (%rax),%rax
     0x0000000000400891 &lt;+67&gt;:    mov    %rax,%rdi
     0x0000000000400894 &lt;+70&gt;:    call   0x400570 &lt;strlen@plt&gt;
     0x0000000000400899 &lt;+75&gt;:    cmp    $0x4,%rax
     0x000000000040089d &lt;+79&gt;:    je     0x4008c2 &lt;main+116&gt;
     0x000000000040089f &lt;+81&gt;:    mov    -0x40(%rbp),%rax
     0x00000000004008a3 &lt;+85&gt;:    mov    (%rax),%rax
     0x00000000004008a6 &lt;+88&gt;:    mov    %rax,%rsi
     0x00000000004008a9 &lt;+91&gt;:    mov    $0x4009a2,%edi
     0x00000000004008ae &lt;+96&gt;:    mov    $0x0,%eax
     0x00000000004008b3 &lt;+101&gt;:   call   0x400580 &lt;printf@plt&gt;
     0x00000000004008b8 &lt;+106&gt;:   mov    $0x1,%edi
     0x00000000004008bd &lt;+111&gt;:   call   0x4005e0 &lt;exit@plt&gt;
     0x00000000004008c2 &lt;+116&gt;:   movl   $0x0,-0x4(%rbp)
     0x00000000004008c9 &lt;+123&gt;:   mov    $0x4009b3,%edi
     0x00000000004008ce &lt;+128&gt;:   mov    $0x0,%eax
     0x00000000004008d3 &lt;+133&gt;:   call   0x400580 &lt;printf@plt&gt;
     0x00000000004008d8 &lt;+138&gt;:   lea    -0x30(%rbp),%rax
     0x00000000004008dc &lt;+142&gt;:   mov    %rax,%rdi
     0x00000000004008df &lt;+145&gt;:   call   0x4005d0 &lt;gets@plt&gt;
     0x00000000004008e4 &lt;+150&gt;:   cmpl   $0x0,-0x4(%rbp)
     0x00000000004008e8 &lt;+154&gt;:   je     0x4008f8 &lt;main+170&gt;
     0x00000000004008ea &lt;+156&gt;:   mov    -0x40(%rbp),%rax
     0x00000000004008ee &lt;+160&gt;:   mov    %rax,%rdi
     0x00000000004008f1 &lt;+163&gt;:   call   0x4006dd &lt;fg&gt;
     0x00000000004008f6 &lt;+168&gt;:   jmp    0x400902 &lt;main+180&gt;
     0x00000000004008f8 &lt;+170&gt;:   mov    $0x4009cd,%edi
     0x00000000004008fd &lt;+175&gt;:   call   0x400560 &lt;puts@plt&gt;
     0x0000000000400902 &lt;+180&gt;:   mov    $0x0,%eax
     0x0000000000400907 &lt;+185&gt;:   leave  
     0x0000000000400908 &lt;+186&gt;:   ret    
  End of assembler dump.
  </code></pre>