<div dir="ltr">Hi,<div><br></div><div>O ur company is using Buck(<a href="https://buckbuild.com/">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>This seems to break the lldb in various aspect:</div><div>1. Setting source line breakpoint in library files are not working</div><div>2. Callstack did not show the source location well for library frame</div><div><br></div><div>I tried latest lldb which this bug still reproduces. Here is the logging for it:</div><div><div>(lldb) b TaoDataLayer.cpp:50</div><div>Target::AddBreakpoint (internal = no) => break_id = 6: file = 'TaoDataLayer.cpp', line = 50, exact_match = 0</div><div><b>error: Unable to set breakpoint for TaoDataLayer.cpp:50  at file address 0xffffffffffffffff</b><br></div><div>Breakpoint 6: no locations (pending).<br></div><div>WARNING:  Unable to resolve breakpoint to any actual locations.</div></div><div><br></div><div><br></div><div>My debugging shows the Address::IsValid() returns false for line start symbol here because it's file address is 0xffffffffffffffff:</div><div><a href="https://github.com/llvm-mirror/lldb/blob/ceb5f6cd339a4bcd49666158578f883c1ec96663/source/Breakpoint/BreakpointResolver.cpp#L263">https://github.com/llvm-mirror/lldb/blob/ceb5f6cd339a4bcd49666158578f883c1ec96663/source/Breakpoint/BreakpointResolver.cpp#L263</a><br></div><div><br></div><div>It seems that, after locating the symbol for the line_entry, the code below did not update <span style="color:rgb(51,51,51);font-family:consolas,"liberation mono",menlo,courier,monospace;font-size:12px;white-space:pre">sc.</span><span class="gmail-pl-smi" style="box-sizing:border-box;color:rgb(51,51,51);font-family:consolas,"liberation mono",menlo,courier,monospace;font-size:12px;white-space:pre">line_entry pointing to the original line_entry so it contains the uninitialized </span>0xffffffffffffffff value which will fail the isValid() check later:</div><div><a href="https://github.com/llvm-mirror/lldb/blob/26fea9dbbeb3020791cdbc46fbf3cc9d7685d7fd/source/Symbol/CompileUnit.cpp#L375">https://github.com/llvm-mirror/lldb/blob/26fea9dbbeb3020791cdbc46fbf3cc9d7685d7fd/source/Symbol/CompileUnit.cpp#L375</a><br></div><div><br></div><div>I tried to fix this by doing "<span style="color:rgb(51,51,51);font-family:consolas,"liberation mono",menlo,courier,monospace;font-size:12px;white-space:pre">sc.</span><span class="gmail-pl-smi" style="box-sizing:border-box;color:rgb(51,51,51);font-family:consolas,"liberation mono",menlo,courier,monospace;font-size:12px;white-space:pre">line_entry</span><span style="color:rgb(51,51,51);font-family:consolas,"liberation mono",menlo,courier,monospace;font-size:12px;white-space:pre"> = line_entry;</span>" before both resolve_scope branches. This seems to fix the breakpoint but the callstack and source locator still can't locate the source file correctly while hitting the breakpoint.</div><div><br></div><div>Questions:</div><div>1. Is this a known issue? If so, is there any existing fix I can port?</div><div>2. If not, does my investigation above sound reasonable? Any suggestion/direction for callstack and source locator part of fix?</div><div><br></div><div>Thanks</div><div>Jeffrey</div></div>