Patch from Filipe!

One fixes a trailing comma bug (g++ doesn't like them)
The other gets the Error from the result of an expression evaluation and uses it as the error for the Process::LoadImage() method.

llvm-svn: 139336
This commit is contained in:
Johnny Chen 2011-09-09 00:01:43 +00:00
parent 2592b87209
commit e92aa43b3b
2 changed files with 3 additions and 2 deletions

View File

@ -234,7 +234,7 @@ protected:
flagsGotDebugRangesData = (1 << 9),
flagsGotDebugStrData = (1 << 10),
flagsGotDebugNamesData = (1 << 11),
flagsGotDebugTypesData = (1 << 12),
flagsGotDebugTypesData = (1 << 12)
};
DISALLOW_COPY_AND_ASSIGN (SymbolFileDWARF);

View File

@ -1155,7 +1155,8 @@ Process::LoadImage (const FileSpec &image_spec, Error &error)
const char *prefix = "extern \"C\" void* dlopen (const char *path, int mode);\n";
lldb::ValueObjectSP result_valobj_sp;
ClangUserExpression::Evaluate (exe_ctx, unwind_on_error, expr.GetData(), prefix, result_valobj_sp);
if (result_valobj_sp->GetError().Success())
error = result_valobj_sp->GetError();
if (error.Success())
{
Scalar scalar;
if (result_valobj_sp->ResolveValue (scalar))