title: C programming: How to use gdb with Makefile and command line arguments?
body: <p>To create the .out executable, I have to enter:</p>
  
  <pre><code>$: make
  $: myprogram.out name.ged
  </code></pre>
  
  <p>My program incorporates a command line argument, thus the "name.ged".</p>
  
  <p>Whenever I run gdb after getting a segmentation fault (core dumped), I enter:</p>
  
  <pre><code>$: gdb a.out core
  (gdb): bt
  </code></pre>
  
  <p>I then use the back trace command, and gdb returns:</p>
  
  <pre><code>#0 0x4a145155 in ?? ()
  #1 0x08a16ce0 in ?? ()
  </code></pre>
  
  <p>I even tried using the up command t move up the stack, but still no luck. I can't tell which line in my program is giving me the seg fault. gdb works with my other programs that do not involve a Makefile and command arguments, so I'm wondering if my commands are incorrect. </p>