title: GDB is not working, getting [New Thread 0xf03 of process 20199] as output
body: <p>GDB does not seem to be working at all for me. I compiled my program using -g option, and I am trying on very simple C program for sanity check and it is not working. </p>
  
  <p>Here is the C program I am using: </p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main(int argc, char * argv[]){
  
    printf("Hey");
  
    return 0;
  }
  
  </code></pre>
  
  <p>I compiled it with this command:
  <code>gcc -std=c99 -g -o test test.c</code></p>
  
  <p>Upon running gdb this is what I get:</p>
  
  <pre><code>...
   $ gdb ./test
  GNU gdb (GDB) 8.3.1
  Copyright (C) 2019 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 "show copying" and "show warranty" for details.
  This GDB was configured as "x86_64-apple-darwin18.7.0".
  Type "show configuration" for configuration details.
  For bug reporting instructions, please see:
  &lt;http://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 "help".
  Type "apropos word" to search for commands related to "word"...
  Reading symbols from ./test...
  Reading symbols from /Users/Braulio/Programming/C/ComputerArchitecture/floatingPoint/test.dSYM/Contents/Resources/DWARF/test...
  (gdb) run
  Starting program: /Users/Braulio/Programming/C/ComputerArchitecture/floatingPoint/test
  [New Thread 0xd03 of process 13458]
  
  </code></pre>
  
  <p>and it just hangs here.</p>
  
  <p>I was previously having issues with codesign, I followed the steps given here <a href="https://sourceware.org/gdb/wiki/PermissionsDarwin" rel="nofollow noreferrer">https://sourceware.org/gdb/wiki/PermissionsDarwin</a>
  I no longer have the codesign issue. </p>
  
  <p><strong>Update</strong></p>
  
  <p>I followed user3629249 suggestions</p>
  
  <p>Compiled using: <code>$ gcc -std=c99 -ggdb3 -Wall -Wextra -Wconversion -pedantic -c test.c -o test.o</code></p>
  
  <p>It is still hanging on <code>[New Thread 0x1203 of process 17921]</code></p>
  
  <pre><code> $ gdb test.o
  GNU gdb (GDB) 8.3.1
  Copyright (C) 2019 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 "show copying" and "show warranty" for details.
  This GDB was configured as "x86_64-apple-darwin18.7.0".
  Type "show configuration" for configuration details.
  For bug reporting instructions, please see:
  &lt;http://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 "help".
  Type "apropos word" to search for commands related to "word"...
  Reading symbols from test.o...
  (gdb) break main
  Breakpoint 1 at 0xf: file test.c, line 40.
  (gdb) run
  Starting program: /Users/Braulio/Programming/C/ComputerArchitecture/floatingPoint/test.o
  [New Thread 0x1203 of process 17921]
  </code></pre>
  
  <p>However this time it is only Reading symbols from one location </p>