title: GDB debugging a coredump with missing symbol tables for a specific call stack
body: <p>I got this weird crash and I have no idea how to debug the core dump since the call stack is missing symbols info for some reason, except for the last function:</p>
  
  <pre><code>#0  BIH::intersectRay&lt;VMAP::MapRayCallback&gt; (this=0x7f47b8339608, r=..., intersectCallback=..., maxDist=@0x7f493af8383c: 0, stopAtFirst=true, los=&lt;optimized out&gt;) at ../BIH.h:223
  #1  0x000000307ff00000 in ?? ()
  #2  0x7ff0000000000000 in ?? ()
  #3  0x0000000000000030 in ?? ()
  #4  0x000000307ff00000 in ?? ()
  #5  0x7ff0000000000000 in ?? ()
  #6  0x0000000000000030 in ?? ()
  #7  0x000000307ff00000 in ?? ()
  #8  0x7ff0000000000000 in ?? ()
  #9  0x0000000000000030 in ?? ()
  #10 0x000000307ff00000 in ?? ()
  #11 0x7ff0000000000000 in ?? ()
  #12 0x0000000000000030 in ?? ()
  #13 0x000000307ff00000 in ?? ()
  #14 0x7ff0000000000000 in ?? ()
  #15 0x0000000000000030 in ?? ()
  #16 0x000000307ff00000 in ?? ()
  #17 0x7ff0000000000000 in ?? ()
  #18 0x0000000000000030 in ?? ()
  #19 0x000000307ff00000 in ?? ()
  #20 0x7ff0000000000000 in ?? ()
  #21 0x0000000000000030 in ?? ()
  #22 0x000000307ff00000 in ?? ()
  ....
  #749 0x7ff0000000000000 in ?? ()
  #750 0x0000000000000030 in ?? ()
  #751 0x000000307ff00000 in ?? ()
  #752 0x7ff0000000000000 in ?? ()
  #753 0x0000000000000030 in ?? ()
  #754 0x000000307ff00000 in ?? ()
  #755 0x7ff0000000000000 in ?? ()
  #756 0x0000000000000030 in ?? ()
  #757 0x000000307ff00000 in ?? ()
  #758 0x7ff0000000000000 in ?? ()
  #759 0x0000000000000030 in ?? ()
  #760 0x000000307ff00000 in ?? ()
  #761 0x7ff0000000000000 in ?? ()
  #762 0x0000000000000030 in ?? ()
  #763 0x000000307ff00000 in ?? ()
  #764 0x03010102464c457f in ?? ()
  #765 0x0000000000000000 in ?? ()`
  
  
  (gdb) info frame 0
  Stack frame at 0x7f493af83830:
   rip = 0x930f0b in BIH::intersectRay&lt;VMAP::MapRayCallback&gt; (../BIH.h:223); saved rip = 0x307ff00000
   called by frame at 0x7f493af83838
   source language c++.
   Arglist at 0x7f493af83438, args: this=0x7f47b8339608, r=..., intersectCallback=..., maxDist=@0x7f493af8383c: 0, stopAtFirst=true, los=&lt;optimized out&gt;
   Locals at 0x7f493af83438, Previous frame's sp is 0x7f493af83830
   Saved registers:
    rbx at 0x7f493af837f8, rbp at 0x7f493af83800, r12 at 0x7f493af83808, r13 at 0x7f493af83810, r14 at 0x7f493af83818, r15 at 0x7f493af83820, rip at 0x7f493af83828
  
  #1  0x000000307ff00000 in ?? ()
  No symbol table info available.
  (gdb) info frame 1
  Stack frame at 0x7f493af83838:
   rip = 0x307ff00000; saved rip = 0x7ff0000000000000
   called by frame at 0x7f493af83840, caller of frame at 0x7f493af83830
   Arglist at 0x7f493af83828, args:
   Locals at 0x7f493af83828, Previous frame's sp is 0x7f493af83838
   Saved registers:
    rip at 0x7f493af83830
  
  #2  0x7ff0000000000000 in ?? ()
  No symbol table info available.
  (gdb) info frame 2
  Stack frame at 0x7f493af83840:
   rip = 0x7ff0000000000000; saved rip = 0x30
   called by frame at 0x7f493af83848, caller of frame at 0x7f493af83838
   Arglist at 0x7f493af83830, args:
   Locals at 0x7f493af83830, Previous frame's sp is 0x7f493af83840
   Saved registers:
    rip at 0x7f493af83838
  
  #3  0x0000000000000030 in ?? ()
  No symbol table info available.
  (gdb) info frame 3
  Stack frame at 0x7f493af83848:
   rip = 0x30; saved rip = 0x307ff00000
   called by frame at 0x7f493af83850, caller of frame at 0x7f493af83840
   Arglist at 0x7f493af83838, args:
   Locals at 0x7f493af83838, Previous frame's sp is 0x7f493af83848
   Saved registers:
    rip at 0x7f493af83840
  
  #4  0x000000307ff00000 in ?? ()
  No symbol table info available.
  (gdb) info frame 4
  Stack frame at 0x7f493af83850:
   rip = 0x307ff00000; saved rip = 0x7ff0000000000000
   called by frame at 0x7f493af83858, caller of frame at 0x7f493af83848
   Arglist at 0x7f493af83840, args:
   Locals at 0x7f493af83840, Previous frame's sp is 0x7f493af83850
   Saved registers:
    rip at 0x7f493af83848
  </code></pre>
  
  <p>The code is compiled with <code>-g -fvar-tracking -O2 -march=native</code>.   </p>
  
  <p>I had various dumps for various crashes that all had the symbol tables working and gave relevant call stacks and infos, but for some reason this specific crash is cryptic.  </p>
  
  <p>One thing I noticed is the same address numbers repeating over and over again, could it be some infinite loop or recursion of some sorts that is corrupting or overflowing the stack?<br>
  If that so, is there any way to get the top most functions in the call stack (e.g. any way to go above frame #765 or get the functions called before the overflow was triggered)?</p>
  
  <p>I cannot set <code>$sp</code> or <code>jump</code> to any address due to that I cannot debug and step through the live program, just analyse the core dump.<br>
  I cannot replicate this crash, it happens on production from time to time. Also valgrind is out of the question.  </p>
  
  <p>Are there any <code>g++</code> compiler options or <code>gdb</code> flags that could help me with this?<br>
  Any pointers on how to debug such an issue is appreciated (if possible at all).</p>