diff options
author | Sean Callanan <scallanan@apple.com> | 2011-05-07 01:06:41 +0000 |
---|---|---|
committer | Sean Callanan <scallanan@apple.com> | 2011-05-07 01:06:41 +0000 |
commit | 63697e5025f65c60953fd0ca72203d60715924e9 (patch) | |
tree | ae6dd0d19ee39c1e43329de0b20b98fc6f756f2a /lldb/source/Target/Process.cpp | |
parent | 95496b18569913774c7d1d8f27cc5917f4fa64c0 (diff) | |
download | bcm5719-llvm-63697e5025f65c60953fd0ca72203d60715924e9.tar.gz bcm5719-llvm-63697e5025f65c60953fd0ca72203d60715924e9.zip |
Made expressions that are just casts of pointer
variables be evaluated statically.
Also fixed a bug that caused the results of
statically-evaluated expressions to be materialized
improperly.
This bug also removes some duplicate code.
llvm-svn: 131042
Diffstat (limited to 'lldb/source/Target/Process.cpp')
-rw-r--r-- | lldb/source/Target/Process.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp index 7bdccdaf4d0..80d1d758cf5 100644 --- a/lldb/source/Target/Process.cpp +++ b/lldb/source/Target/Process.cpp @@ -1246,14 +1246,13 @@ Process::LoadImage (const FileSpec &image_spec, Error &error) ExecutionContext exe_ctx; frame_sp->CalculateExecutionContext (exe_ctx); bool unwind_on_error = true; - bool keep_in_memory = false; StreamString expr; char path[PATH_MAX]; image_spec.GetPath(path, sizeof(path)); 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, keep_in_memory, unwind_on_error, expr.GetData(), prefix, result_valobj_sp); + ClangUserExpression::Evaluate (exe_ctx, unwind_on_error, expr.GetData(), prefix, result_valobj_sp); if (result_valobj_sp->GetError().Success()) { Scalar scalar; @@ -1314,12 +1313,11 @@ Process::UnloadImage (uint32_t image_token) ExecutionContext exe_ctx; frame_sp->CalculateExecutionContext (exe_ctx); bool unwind_on_error = true; - bool keep_in_memory = false; StreamString expr; 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, unwind_on_error, keep_in_memory, expr.GetData(), prefix, result_valobj_sp); + ClangUserExpression::Evaluate (exe_ctx, unwind_on_error, expr.GetData(), prefix, result_valobj_sp); if (result_valobj_sp->GetError().Success()) { Scalar scalar; |