[Lldb-commits] [lldb] r117342 - in /lldb/trunk/source: Expression/ClangExpressionDeclMap.cpp Expression/ClangExpressionParser.cpp Expression/IRForTarget.cpp Target/ThreadPlanCallFunction.cpp
Sean Callanan
scallanan at apple.com
Mon Oct 25 17:31:56 PDT 2010
Author: spyffe
Date: Mon Oct 25 19:31:56 2010
New Revision: 117342
URL: http://llvm.org/viewvc/llvm-project?rev=117342&view=rev
Log:
Fixed a problem where function calls on i386 weren't
being generated correctly.
Also added a messy way to single-step through expressions
that I will improve soon.
Modified:
lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp
lldb/trunk/source/Expression/ClangExpressionParser.cpp
lldb/trunk/source/Expression/IRForTarget.cpp
lldb/trunk/source/Target/ThreadPlanCallFunction.cpp
Modified: lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp?rev=117342&r1=117341&r2=117342&view=diff
==============================================================================
--- lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp (original)
+++ lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp Mon Oct 25 19:31:56 2010
@@ -88,8 +88,12 @@
}
if (m_materialized_location)
- {
+ {
+//#define SINGLE_STEP_EXPRESSIONS
+
+#ifndef SINGLE_STEP_EXPRESSIONS
m_exe_ctx.process->DeallocateMemory(m_materialized_location);
+#endif
m_materialized_location = 0;
}
}
Modified: lldb/trunk/source/Expression/ClangExpressionParser.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ClangExpressionParser.cpp?rev=117342&r1=117341&r2=117342&view=diff
==============================================================================
--- lldb/trunk/source/Expression/ClangExpressionParser.cpp (original)
+++ lldb/trunk/source/Expression/ClangExpressionParser.cpp Mon Oct 25 19:31:56 2010
@@ -467,13 +467,19 @@
std::string error_string;
+ llvm::Reloc::Model relocation_model = llvm::TargetMachine::getRelocationModel();
+
+ llvm::TargetMachine::setRelocationModel(llvm::Reloc::PIC_);
+
m_execution_engine.reset(llvm::ExecutionEngine::createJIT (module,
&error_string,
m_jit_mm,
- CodeGenOpt::Default,
+ CodeGenOpt::Less,
true,
CodeModel::Small));
+ llvm::TargetMachine::setRelocationModel(relocation_model);
+
if (!m_execution_engine.get())
{
err.SetErrorToGenericError();
Modified: lldb/trunk/source/Expression/IRForTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/IRForTarget.cpp?rev=117342&r1=117341&r2=117342&view=diff
==============================================================================
--- lldb/trunk/source/Expression/IRForTarget.cpp (original)
+++ lldb/trunk/source/Expression/IRForTarget.cpp Mon Oct 25 19:31:56 2010
@@ -335,6 +335,9 @@
if (!m_decl_map->GetFunctionAddress (g_sel_registerName_str, srN_addr))
return false;
+ if (log)
+ log->Printf("Found sel_registerName at 0x%llx", srN_addr);
+
// Build the function type: struct objc_selector *sel_registerName(uint8_t*)
// The below code would be "more correct," but in actuality what's required is uint8_t*
Modified: lldb/trunk/source/Target/ThreadPlanCallFunction.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ThreadPlanCallFunction.cpp?rev=117342&r1=117341&r2=117342&view=diff
==============================================================================
--- lldb/trunk/source/Target/ThreadPlanCallFunction.cpp (original)
+++ lldb/trunk/source/Target/ThreadPlanCallFunction.cpp Mon Oct 25 19:31:56 2010
@@ -276,10 +276,13 @@
void
ThreadPlanCallFunction::DidPush ()
{
+//#define SINGLE_STEP_EXPRESSIONS
+
+#ifndef SINGLE_STEP_EXPRESSIONS
m_subplan_sp.reset(new ThreadPlanRunToAddress(m_thread, m_start_addr, m_stop_other_threads));
m_thread.QueueThreadPlan(m_subplan_sp, false);
-
+#endif
}
bool
More information about the lldb-commits
mailing list