title: gdb not giving the complete description of the error
body: <p>I have just shifted to ubuntu and newly using gdb and g++ . Please forgive me if my question is silly . </p>
  
  <p>This is from Richard Stevens Advanced Linux Programming . Three files were created in the folder names reciprocal 
  <code>main.c</code>:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include "reciprocal.hpp"
  int main (int argc, char **argv)
  {
    int i;
    i = atoi (argv[1]);
    printf ("The reciprocal of %d is %g\n", i, reciprocal (i));
    return 0;
  }
  </code></pre>
  
  <p><code>reciprocal.cpp</code>:</p>
  
  <pre><code>#include &lt;cassert&gt;
  #include "reciprocal.hpp"
  double reciprocal (int i) {
    // I should be non-zero.
    assert (i != 0);
    return 1.0/i;
  }
  </code></pre>
  
  <p><code>reciprocal.hpp</code>:</p>
  
  <pre><code>#ifdef __cplusplus
  extern "C" {
  #endif
  extern double reciprocal (int i);
  
  #ifdef __cplusplus
  }
  #endif
  </code></pre>
  
  <p>After compiling , I ran the command <code>(gdb) reciprocal</code> and the <code>(gdb) run</code> . I was expecting something as in the book </p>
  
  <pre><code>Starting program: reciprocal
  Program received signal SIGSEGV, Segmentation fault.
  __strtol_internal (nptr=0x0, endptr=0x0, base=10, group=0)
  at strtol.c:287
  287 strtol.c: No such file or directory.
  (gdb)
  </code></pre>
  
  <p>But I got :</p>
  
  <pre><code>Starting program: /home/trafalgar/Desktop/reciprocal/reciprocal
  warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7ffff7ffa000
  
  Program received signal SIGSEGV , Segmentation fault.
  0x00007ffff7a56ad4 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
  </code></pre>
  
  <p>What might be happening different . Is this a version problem or anything else ? </p>
  
  <p>Here is the Makefile </p>
  
  <pre><code>reciprocal: main.o reciprocal.o
             g++ $(CFLAGS) -o reciprocal main.o reciprocal.o
  main.o: main.c reciprocal.hpp
             gcc $(CFLAGS) -c main.c
  reciprocal.o: reciprocal.cpp reciprocal.hpp
             g++ $(CFLAGS) -c reciprocal.cpp
  clean:
        rm -f *.o reciprocal
  </code></pre>