title: Eclipse GDB Launches - "No source available for "gdb[38].proc[42000].threadGroup[...)" "
body: <p>This has been bugging me forever. Perhaps someone else has run into it and found a solution.</p>
  
  <p><strong>Target</strong></p>
  
  <ul>
  <li>Embedded MCU</li>
  </ul>
  
  <p><strong>Setup</strong></p>
  
  <ul>
  <li>Eclipse CDT (8.3.0)</li>
  <li>Custom C/C++ Compiler (company internal, LLVM 3.1/etc, GNU ELF)</li>
  <li>Eclipse GDB Hardware Debugging Launch (8.3.0)</li>
  </ul>
  
  <p><strong>Problem</strong></p>
  
  <p>When I launch my debug-launch for this target, something goes crazy in the backend on gdb which you can see in <em>gdb traces console</em>. It looks like this (... is truncated linesb ):</p>
  
  <p>(names changed to protect the innocent)</p>
  
  <pre><code>..360,743 2-environment-cd /home/jmreina/myworkspace/myproj
  360,743 2^done
  360,743 (gdb) 
  360,744 3-gdb-set breakpoint pending on
  360,744 3^done
  ...
  360,747 9source .gdbinit
  ...
  360,748 ~"Reading symbols from /home/jmreina/myworkspace/myproj/Debug/myproj.elf..."
  ...
  381,233 (gdb) 
  381,233 58^done,groups=[{id="i1",type="process",pid="42000"}]
  ...
  381,516 65-data-disassemble --thread 1 -s 536883209 -e 536883241 -- 1
  381,559 66-data-read-memory 2415919152 x 1 1 4
  381,568 65^done,asm_insns=[src_and_asm_line={line="68",file="/home/jmreina/myworkspace/myproj/myfcns/\
  foo.c",line_asm_insn=[{address="0x2000300e",func-name="foo_initialize",offset="16",inst="call   0x20\
  00409b &lt;memset$fastcc&gt;"},{address="0x20003013",func-name="foo_initialize",offset="21",inst="mov    $\
  0x10,%eax"},{address="0x20003018",func-name="foo_initialize",offset="26",inst="xor    %edx,%edx"},{a\
  ddress="0x2000301a",func-name="foo_initialize",offset="28",inst="mov    $0x60000210,%ecx"}]},src_and\
  _asm_line={line="69",file="/home/jmreina/myworkspace/myproj/myfcns/foo.c",line_asm_insn=[{address="0x\
  2000301f",func-name="foo_initialize",offset="33",inst="call   0x2000409b &lt;memset$fastcc&gt;"}]},src_and\
  _asm_line={line="70",file="/home/jmreina/myworkspace/myproj/myfcns/foo.c",line_asm_insn=[]},src_and_a\
  sm_line={line="71",file="/home/jmreina/myworkspace/myproj/myfcns/foo.c",line_asm_insn=[]},src_and_asm\
  _line={line="72",file="/home/jmreina/myworkspace/myproj/myfcns/foo.c",line_asm_insn=[]},src_and_asm_l\
  ine={line="73",file="/home/jmreina/myworkspace/myproj/myfcns/foo.c",line_asm_insn=[]},src_and_asm_lin\
  e={line="74",file="/home/jmreina/myworkspace/myproj/myfcns/foo.c",line_asm_insn=[]},src_and_asm_line=\
  {line="75",file="/home/jmreina/myworkspace/myproj/myfcns/foo.c",line_asm_insn=[]},src_and_asm_line={l\
  ine="76",file="/home/jmreina/myworkspace/myproj/myfcns/foo.c",line_asm_insn=[]},src_and_asm_line={lin\
  e="77",file="/home/jmreina/myworkspace/myproj/myfcns/foo.c",line_asm_insn=[]},src_and_asm_line={line=\
  "78",file="/home/jmreina/myworkspace/myproj/myfcns/foo.c",line_asm_insn=[]},src_and_asm_line={line="7\
  9",file="/home/jmreina/myworkspace/myproj/myfcns/foo.c",line_asm_insn=[]},src_and_asm_line={line="80"\
  ,file="/home/jmreina/myworkspace/myproj/myfcns/foo.c",line_asm_insn=[]},src_and_asm_line={line="81",f\
  ...
  (FOUR-HUNDRED+ more lines of the same CRAPfrom myfcns/foo.c!)
  ...
  </code></pre>
  
  <p>Eclipse then shows in a blank editor:</p>
  
  <p><img src="https://i.stack.imgur.com/iwVa8.png" alt="enter image description here"></p>
  
  <pre><code>No source available for "(gdb[38].proc[42000].threadGroup[i1],gdb[38].proc[42000].OSthread[1]).thread[1].frame[0]" 
  </code></pre>
  
  <p>I <em>think</em> it shows this because that brick-of-crap above (<strong>432 lines of it!)</strong> took so dang long to load in the back-end, and I think the Eclipse-GDB plugins behind the launch did some sort of timeout.</p>
  
  <p>I am very certain that foo.c sits <em>directly after main() in FLASH</em>. Thus GDB is calling the initialization here to fetch for the Disassembly View in Eclipse.</p>
  
  <p><strong>*Note that if the Disassembly View is closed (not minimized, closed), this doesn't happen.</strong></p>
  
  <p><strong>Question</strong></p>
  
  <ol>
  <li>Whhhhhy! </li>
  <li>How do I even debug this? Maybe .debug_info is corrupt/missing for foo.c?</li>
  </ol>
  
  <p>This annoys the crap out of me, >20 times/day, each and every day. How do I fix, or even understand it!?!?</p>