summaryrefslogtreecommitdiffstats
path: root/lldb/source
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>2015-08-06 21:54:29 +0000
committerJason Molenda <jmolenda@apple.com>2015-08-06 21:54:29 +0000
commit03c9cd08520ade71caedc4ea5468cc8116dd42d6 (patch)
tree9089abaa19cebae40f71e1c03ba100bd173b42d8 /lldb/source
parent6a84cefd0328bd5f66dbeb7519ac076f10bab18d (diff)
downloadbcm5719-llvm-03c9cd08520ade71caedc4ea5468cc8116dd42d6.tar.gz
bcm5719-llvm-03c9cd08520ade71caedc4ea5468cc8116dd42d6.zip
Change the warning message about optimization to be printed once
per Module instead of once per CompileUnit, and print the module name. A module may have a mix of compile units built with optimization and compile units built without optimization -- the warning won't be printed until the user selects a stack frame of a function that was built with optimization. And as before, it will only be printed once per module per debug session. <rdar://problem/19281172> llvm-svn: 244281
Diffstat (limited to 'lldb/source')
-rw-r--r--lldb/source/Target/Thread.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/lldb/source/Target/Thread.cpp b/lldb/source/Target/Thread.cpp
index 0327fe70a29..3acc74a58ba 100644
--- a/lldb/source/Target/Thread.cpp
+++ b/lldb/source/Target/Thread.cpp
@@ -11,6 +11,7 @@
#include "lldb/Core/Debugger.h"
#include "lldb/Core/Log.h"
#include "lldb/Core/FormatEntity.h"
+#include "lldb/Core/Module.h"
#include "lldb/Core/State.h"
#include "lldb/Core/Stream.h"
#include "lldb/Core/StreamString.h"
@@ -428,12 +429,12 @@ Thread::FunctionOptimizationWarning (StackFrame *frame)
{
if (frame && frame->HasDebugInformation())
{
- SymbolContext sc = frame->GetSymbolContext (eSymbolContextFunction | eSymbolContextCompUnit);
- if (sc.function && sc.function->GetIsOptimized() == true && sc.comp_unit)
+ SymbolContext sc = frame->GetSymbolContext (eSymbolContextFunction | eSymbolContextModule);
+ if (sc.function && sc.function->GetIsOptimized() == true && sc.module_sp.get())
{
- if (sc.line_entry.file.GetFilename().IsEmpty() == false)
+ if (sc.module_sp->GetFileSpec().GetFilename().IsEmpty() == false)
{
- GetProcess()->PrintWarning (Process::Warnings::eWarningsOptimization, sc.comp_unit, "%s was compiled with optimization - stepping may behave oddly; variables may not be available.\n", sc.line_entry.file.GetFilename().GetCString());
+ GetProcess()->PrintWarning (Process::Warnings::eWarningsOptimization, sc.module_sp.get(), "%s was compiled with optimization - stepping may behave oddly; variables may not be available.\n", sc.module_sp->GetFileSpec().GetFilename().GetCString());
}
}
}
OpenPOWER on IntegriCloud