<div dir="ltr">Hi Jeffrey,<div><br></div><div>For the source code locating issue based on your info my guess is that LLDB doesn't able to resolve the relative file name path specified in your symbol files to the absolute path required to load the file from disk. Can you try running "target modules dump line-table <file-name>" where the file name is just the name of the file without any path? If the problem is what I am guessing then you should see an output like this (note the relative path).</div><div><div>(lldb) target modules dump line-table s.cpp</div><div>Line table for ./foo/s.cpp in `a.out</div><div>0x0000000000400a0d: ./foo/s.cpp:3</div><div>0x0000000000400a1a: ./foo/s.cpp:4</div><div>0x0000000000400a58: ./foo/s.cpp:4</div><div>0x0000000000400a64: ./foo/s.cpp:5</div><div>0x0000000000400a93: ./foo/s.cpp:6</div><div>0x0000000000400a9e: ./foo/s.cpp:6</div></div><div>...</div><div><br></div><div>The above problem can be worked around either by running LLDB with a current working directory where the file path displayed by "target modules dump line-table" is relative to or setting up a directory remapping for that path using "settings set target.source-map ./ <absolute-path>".</div><div><br></div><div>Tamas</div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Jan 9, 2017 at 11:55 PM Greg Clayton via lldb-dev <<a href="mailto:lldb-dev@lists.llvm.org">lldb-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="gmail_msg">In ELF files if there is a section named “<font color="#d12f1b" class="gmail_msg"><span style="font-size:11px" class="gmail_msg">.gnu_debuglink” it will contain a path to the external debug file. Dump this section and see what it contains. </span></font><span style="font-size:11px;color:rgb(209,47,27)" class="gmail_msg">This section contains a null terminated C string as the path followed by a 4 byte aligned 32 bit integer which is a file CRC. </span><span style="color:rgb(209,47,27);font-size:11px" class="gmail_msg">Check to see the path is relative.</span><div class="gmail_msg"><font color="#d12f1b" class="gmail_msg"><span style="font-size:11px" class="gmail_msg"><br class="gmail_msg"></span></font></div><div class="gmail_msg"><font color="#d12f1b" class="gmail_msg"><span style="font-size:11px" class="gmail_msg">I am guessing this is your problem.</span></font></div></div><div style="word-wrap:break-word" class="gmail_msg"><div class="gmail_msg"><font color="#d12f1b" class="gmail_msg"><span style="font-size:11px" class="gmail_msg"><br class="gmail_msg"></span></font></div><div class="gmail_msg"><font color="#d12f1b" class="gmail_msg"><span style="font-size:11px" class="gmail_msg">Greg</span></font></div></div><div style="word-wrap:break-word" class="gmail_msg"><div class="gmail_msg"><font color="#d12f1b" class="gmail_msg"><span style="font-size:11px" class="gmail_msg"><br class="gmail_msg"></span></font><div class="gmail_msg"><font color="#d12f1b" class="gmail_msg"><span style="font-size:11px" class="gmail_msg"><br class="gmail_msg"></span></font><div class="gmail_msg"><blockquote type="cite" class="gmail_msg"><div class="gmail_msg">On Jan 9, 2017, at 3:42 PM, Jeffrey Tan <<a href="mailto:jeffrey.fudan@gmail.com" class="gmail_msg" target="_blank">jeffrey.fudan@gmail.com</a>> wrote:</div><br class="m_8768436078601182138Apple-interchange-newline gmail_msg"><div class="gmail_msg"><div dir="ltr" class="gmail_msg">Hey Greg, I just confirmed this with our build team. I seem to have misunderstood the location of debug symbol. It is actually not inside each individual object file but:<div class="gmail_msg"><div style="margin:0px;padding:0px;font-family:'san francisco',-apple-system,blinkmacsystemfont,'.sfnstext-regular',sans-serif;color:rgb(29,33,41);font-size:12px;letter-spacing:-0.24px;background-color:rgb(246,247,249)" class="gmail_msg">The debug info in <code style="background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;background-color:rgb(233,235,238);font-size:10.8px;padding:1px 4px;font-family:menlo,consolas,monaco,monospace;letter-spacing:normal" class="gmail_msg">dev</code> mode sits in the <code style="background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;background-color:rgb(233,235,238);font-size:10.8px;padding:1px 4px;font-family:menlo,consolas,monaco,monospace;letter-spacing:normal" class="gmail_msg">.debug_*</code> sections of the shared libraries<span class="m_8768436078601182138gmail-text_exposed_show gmail_msg" style="display:inline;font-family:inherit"> (we don't use debug fission).</span></div><div class="m_8768436078601182138gmail-text_exposed_show gmail_msg" style="display:inline;font-family:"san francisco",-apple-system,blinkmacsystemfont,".sfnstext-regular",sans-serif;color:rgb(29,33,41);font-size:12px;letter-spacing:-0.24px;background-color:rgb(246,247,249)"><div style="margin:0px;padding:0px;font-family:inherit" class="gmail_msg">One potential complicating factor is that we relativize the <code style="background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;background-color:rgb(233,235,238);font-size:10.8px;padding:1px 4px;font-family:menlo,consolas,monaco,monospace;letter-spacing:normal" class="gmail_msg">DW_AT_comp_dir</code>attributes in the DWARF info, so that it's almost always just a long reference to the current working directory (e.g. <code style="background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;background-color:rgb(233,235,238);font-size:10.8px;padding:1px 4px;font-family:menlo,consolas,monaco,monospace;letter-spacing:normal" class="gmail_msg">.///</code>).</div><div style="margin:0px;padding:0px;font-family:inherit" class="gmail_msg"><br class="gmail_msg"></div><div style="margin:0px;padding:0px;font-family:inherit" class="gmail_msg">I do not know why this(symbol in shared library) would cause the bug though.</div><div style="margin:0px;padding:0px;font-family:inherit" class="gmail_msg"><br class="gmail_msg"></div><div style="margin:0px;padding:0px;font-family:inherit" class="gmail_msg">Jeffrey</div></div></div></div><div class="gmail_extra gmail_msg"><br class="gmail_msg"><div class="gmail_quote gmail_msg">On Mon, Jan 9, 2017 at 1:57 PM, Greg Clayton <span dir="ltr" class="gmail_msg"><<a href="mailto:clayborg@gmail.com" class="gmail_msg" target="_blank">clayborg@gmail.com</a>></span> wrote:<br class="gmail_msg"><blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="gmail_msg">Comments below.<div class="gmail_msg"><br class="gmail_msg"><div class="gmail_msg"><span class="gmail_msg"><blockquote type="cite" class="gmail_msg"><div class="gmail_msg">On Jan 9, 2017, at 1:10 PM, Jeffrey Tan via lldb-dev <<a href="mailto:lldb-dev@lists.llvm.org" class="gmail_msg" target="_blank">lldb-dev@lists.llvm.org</a>> wrote:</div><br class="m_8768436078601182138m_6798138216981228047Apple-interchange-newline gmail_msg"><div class="gmail_msg"><div dir="ltr" class="gmail_msg">Hi,<div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">O ur company is using Buck(<a href="https://buckbuild.com/" class="gmail_msg" target="_blank">https://buckbuild.com/</a>) to build internal service. Recently the build team made a change in buck to not merge dwarf symbols from each object file into final binary so debugger needs to read source/symbol table from compilation unit itself.</div></div></div></blockquote><div class="gmail_msg"><br class="gmail_msg"></div></span>How are debug symbols expected to be found? Is fission being used where the DWARF for each compile unit is in .dwo files and the main executable has skeleton DWARF? I will skip all other questions until we know more about how and where the DWARF is.</div></div><span class="m_8768436078601182138HOEnZb gmail_msg"><font color="#888888" class="gmail_msg"><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Greg Clayton</div><div class="gmail_msg"><br class="gmail_msg"></div></font></span></div></blockquote></div><br class="gmail_msg"></div>
</div></blockquote></div><br class="gmail_msg"></div></div></div>_______________________________________________<br class="gmail_msg">
lldb-dev mailing list<br class="gmail_msg">
<a href="mailto:lldb-dev@lists.llvm.org" class="gmail_msg" target="_blank">lldb-dev@lists.llvm.org</a><br class="gmail_msg">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev" rel="noreferrer" class="gmail_msg" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev</a><br class="gmail_msg">
</blockquote></div>