summaryrefslogtreecommitdiffstats
path: root/lldb/source/Expression/IRForTarget.cpp
diff options
context:
space:
mode:
authorSean Callanan <scallanan@apple.com>2010-07-28 01:00:59 +0000
committerSean Callanan <scallanan@apple.com>2010-07-28 01:00:59 +0000
commitcc54bd3cef954915885bc0fd6a12233585a41bc8 (patch)
treecbb62b59c52985a27e5abd4563cf8aba07ec9070 /lldb/source/Expression/IRForTarget.cpp
parent8aeb0fb5cad64aeeac8a703d881e727d57027d4b (diff)
downloadbcm5719-llvm-cc54bd3cef954915885bc0fd6a12233585a41bc8.tar.gz
bcm5719-llvm-cc54bd3cef954915885bc0fd6a12233585a41bc8.zip
Added and improved logging. This is helping us as we
diagnose a problem where we're not correctly emitting PIC code. llvm-svn: 109568
Diffstat (limited to 'lldb/source/Expression/IRForTarget.cpp')
-rw-r--r--lldb/source/Expression/IRForTarget.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/lldb/source/Expression/IRForTarget.cpp b/lldb/source/Expression/IRForTarget.cpp
index f79078001fb..80ed0e29188 100644
--- a/lldb/source/Expression/IRForTarget.cpp
+++ b/lldb/source/Expression/IRForTarget.cpp
@@ -511,20 +511,22 @@ IRForTarget::runOnModule(Module &M)
return false;
}
+ // TEMPORARY FOR DEBUGGING
+ M.dump();
+
if (!replaceVariables(M, function))
return false;
if (log)
{
- for (bbi = function->begin();
- bbi != function->end();
- ++bbi)
- {
- log->Printf("Rewrote basic block %s for running: \n%s",
- bbi->hasName() ? bbi->getNameStr().c_str() : "[anonymous]",
- PrintValue(bbi).c_str());
- }
+ std::string s;
+ raw_string_ostream oss(s);
+
+ M.print(oss, NULL);
+
+ oss.flush();
+ log->Printf("Module after preparing for execution: \n%s", s.c_str());
}
return true;
OpenPOWER on IntegriCloud