<div dir="ltr">Hi Jim, this seems to have broken the build. Doesn't seem Windows-specific either. Was there a piece missing from your checkin?<div><br></div><div>Here's a patch that (maybe?) addresses this, but I'm not familiar with this codepath so I'm not sure how to exercise it and test.</div>
<div><br></div><div>If I don't hear back in an hour or so I may see about reverting it, since I'm not sure if the attached fix is correct.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jul 17, 2014 at 11:55 AM, Jim Ingham <span dir="ltr"><<a href="mailto:jingham@apple.com" target="_blank">jingham@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: jingham<br>
Date: Thu Jul 17 13:55:25 2014<br>
New Revision: 213294<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=213294&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=213294&view=rev</a><br>
Log:<br>
In Process::LoadImage, if dlopen returns 0x0 fetch the error with dlerror and report<br>
that in the returned Error.<br>
<br>
Modified:<br>
lldb/trunk/source/Target/Process.cpp<br>
<br>
Modified: lldb/trunk/source/Target/Process.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Process.cpp?rev=213294&r1=213293&r2=213294&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Process.cpp?rev=213294&r1=213293&r2=213294&view=diff</a><br>
==============================================================================<br>
--- lldb/trunk/source/Target/Process.cpp (original)<br>
+++ lldb/trunk/source/Target/Process.cpp Thu Jul 17 13:55:25 2014<br>
@@ -1550,6 +1550,31 @@ Process::LoadImage (const FileSpec &imag<br>
m_image_tokens.push_back (image_ptr);<br>
return image_token;<br>
}<br>
+ else if (image_ptr == 0)<br>
+ {<br>
+ prefix = "extern \"C\" const char *dlerror(void);\n";<br>
+ expr.Clear();<br>
+ expr.PutCString("dlerror()");<br>
+ ClangUserExpression::Evaluate (exe_ctx,<br>
+ expr_options,<br>
+ expr.GetData(),<br>
+ prefix,<br>
+ result_valobj_sp,<br>
+ expr_error);<br>
+ if (result_valobj_sp && error.Success())<br>
+ {<br>
+ if (result_valobj_sp->IsCStringContainer(true))<br>
+ {<br>
+ lldb::DataBufferSP buf_sp (new DataBufferHeap());<br>
+ size_t num_chars = result_valobj_sp->ReadPointedString (buf_sp, error);<br>
+ if (error.Success() && num_chars > 0)<br>
+ {<br>
+ error.Clear();<br>
+ error.SetErrorStringWithFormat("dlopen failed: %s", buf_sp->GetBytes());<br>
+ }<br>
+ }<br>
+ }<br>
+ }<br>
}<br>
}<br>
}<br>
<br>
<br>
_______________________________________________<br>
lldb-commits mailing list<br>
<a href="mailto:lldb-commits@cs.uiuc.edu">lldb-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits</a><br>
</blockquote></div><br></div>