forked from OSchip/llvm-project
Carlo Kok found an issue where default parameters were causing the wrong argument to be passed. I got rid of the default args so we don't run into this.
llvm-svn: 167167
This commit is contained in:
parent
e337e60552
commit
26ab83d3dd
|
@ -49,6 +49,7 @@ class ClangUserExpression : public ClangExpression
|
|||
public:
|
||||
typedef STD_SHARED_PTR(ClangUserExpression) ClangUserExpressionSP;
|
||||
|
||||
enum { kDefaultTimeout = 500000u };
|
||||
//------------------------------------------------------------------
|
||||
/// Constructor
|
||||
///
|
||||
|
@ -152,8 +153,8 @@ public:
|
|||
bool discard_on_error,
|
||||
ClangUserExpressionSP &shared_ptr_to_me,
|
||||
lldb::ClangExpressionVariableSP &result,
|
||||
bool try_all_threads = true,
|
||||
uint32_t timeout_usec = 500000);
|
||||
bool try_all_threads,
|
||||
uint32_t timeout_usec);
|
||||
|
||||
ThreadPlan *
|
||||
GetThreadPlanToExecuteJITExpression (Stream &error_stream,
|
||||
|
@ -344,8 +345,8 @@ public:
|
|||
const char *expr_cstr,
|
||||
const char *expr_prefix,
|
||||
lldb::ValueObjectSP &result_valobj_sp,
|
||||
bool try_all_threads = true,
|
||||
uint32_t timeout_usec = 500000);
|
||||
bool try_all_threads,
|
||||
uint32_t timeout_usec);
|
||||
|
||||
static ExecutionResults
|
||||
EvaluateWithError (ExecutionContext &exe_ctx,
|
||||
|
@ -357,8 +358,8 @@ public:
|
|||
const char *expr_prefix,
|
||||
lldb::ValueObjectSP &result_valobj_sp,
|
||||
Error &error,
|
||||
bool try_all_threads = true,
|
||||
uint32_t timeout_usec = 500000);
|
||||
bool try_all_threads,
|
||||
uint32_t timeout_usec);
|
||||
|
||||
static const Error::ValueType kNoResult = 0x1001; ///< ValueObject::GetError() returns this if there is no result from the expression.
|
||||
private:
|
||||
|
|
|
@ -1630,7 +1630,16 @@ Process::LoadImage (const FileSpec &image_spec, Error &error)
|
|||
expr.Printf("dlopen (\"%s\", 2)", path);
|
||||
const char *prefix = "extern \"C\" void* dlopen (const char *path, int mode);\n";
|
||||
lldb::ValueObjectSP result_valobj_sp;
|
||||
ClangUserExpression::Evaluate (exe_ctx, eExecutionPolicyAlways, lldb::eLanguageTypeUnknown, ClangUserExpression::eResultTypeAny, unwind_on_error, expr.GetData(), prefix, result_valobj_sp);
|
||||
ClangUserExpression::Evaluate (exe_ctx,
|
||||
eExecutionPolicyAlways,
|
||||
lldb::eLanguageTypeUnknown,
|
||||
ClangUserExpression::eResultTypeAny,
|
||||
unwind_on_error,
|
||||
expr.GetData(),
|
||||
prefix,
|
||||
result_valobj_sp,
|
||||
true,
|
||||
ClangUserExpression::kDefaultTimeout);
|
||||
error = result_valobj_sp->GetError();
|
||||
if (error.Success())
|
||||
{
|
||||
|
@ -1696,7 +1705,16 @@ Process::UnloadImage (uint32_t image_token)
|
|||
expr.Printf("dlclose ((void *)0x%llx)", image_addr);
|
||||
const char *prefix = "extern \"C\" int dlclose(void* handle);\n";
|
||||
lldb::ValueObjectSP result_valobj_sp;
|
||||
ClangUserExpression::Evaluate (exe_ctx, eExecutionPolicyAlways, lldb::eLanguageTypeUnknown, ClangUserExpression::eResultTypeAny, unwind_on_error, expr.GetData(), prefix, result_valobj_sp);
|
||||
ClangUserExpression::Evaluate (exe_ctx,
|
||||
eExecutionPolicyAlways,
|
||||
lldb::eLanguageTypeUnknown,
|
||||
ClangUserExpression::eResultTypeAny,
|
||||
unwind_on_error,
|
||||
expr.GetData(),
|
||||
prefix,
|
||||
result_valobj_sp,
|
||||
true,
|
||||
ClangUserExpression::kDefaultTimeout);
|
||||
if (result_valobj_sp->GetError().Success())
|
||||
{
|
||||
Scalar scalar;
|
||||
|
|
|
@ -246,7 +246,9 @@ public:
|
|||
bp_loc_sp->GetConditionText(),
|
||||
NULL,
|
||||
result_value_sp,
|
||||
error);
|
||||
error,
|
||||
true,
|
||||
ClangUserExpression::kDefaultTimeout);
|
||||
if (result_code == eExecutionCompleted)
|
||||
{
|
||||
if (result_value_sp)
|
||||
|
@ -567,7 +569,8 @@ public:
|
|||
NULL,
|
||||
result_value_sp,
|
||||
error,
|
||||
500000);
|
||||
true,
|
||||
ClangUserExpression::kDefaultTimeout);
|
||||
if (result_code == eExecutionCompleted)
|
||||
{
|
||||
if (result_value_sp)
|
||||
|
|
Loading…
Reference in New Issue