My bad, fixed in: r213314
Jim > On Jul 17, 2014, at 2:41 PM, Zachary Turner <[email protected]> wrote: > > Hi Jim, this seems to have broken the build. Doesn't seem Windows-specific > either. Was there a piece missing from your checkin? > > 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. > > 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. > > > On Thu, Jul 17, 2014 at 11:55 AM, Jim Ingham <[email protected]> wrote: > Author: jingham > Date: Thu Jul 17 13:55:25 2014 > New Revision: 213294 > > URL: http://llvm.org/viewvc/llvm-project?rev=213294&view=rev > Log: > In Process::LoadImage, if dlopen returns 0x0 fetch the error with dlerror and > report > that in the returned Error. > > Modified: > lldb/trunk/source/Target/Process.cpp > > Modified: lldb/trunk/source/Target/Process.cpp > URL: > http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Process.cpp?rev=213294&r1=213293&r2=213294&view=diff > ============================================================================== > --- lldb/trunk/source/Target/Process.cpp (original) > +++ lldb/trunk/source/Target/Process.cpp Thu Jul 17 13:55:25 2014 > @@ -1550,6 +1550,31 @@ Process::LoadImage (const FileSpec &imag > m_image_tokens.push_back (image_ptr); > return image_token; > } > + else if (image_ptr == 0) > + { > + prefix = "extern \"C\" const char > *dlerror(void);\n"; > + expr.Clear(); > + expr.PutCString("dlerror()"); > + ClangUserExpression::Evaluate (exe_ctx, > + expr_options, > + > expr.GetData(), > + prefix, > + > result_valobj_sp, > + expr_error); > + if (result_valobj_sp && error.Success()) > + { > + if > (result_valobj_sp->IsCStringContainer(true)) > + { > + lldb::DataBufferSP buf_sp (new > DataBufferHeap()); > + size_t num_chars = > result_valobj_sp->ReadPointedString (buf_sp, error); > + if (error.Success() && num_chars > 0) > + { > + error.Clear(); > + > error.SetErrorStringWithFormat("dlopen failed: %s", buf_sp->GetBytes()); > + } > + } > + } > + } > } > } > } > > > _______________________________________________ > lldb-commits mailing list > [email protected] > http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits > > <error.diff> _______________________________________________ lldb-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
