[Lldb-commits] [lldb] r117896 - /lldb/trunk/source/Target/StackFrame.cpp
Sean Callanan
scallanan at apple.com
Sun Oct 31 21:38:59 PDT 2010
Author: spyffe
Date: Sun Oct 31 23:38:59 2010
New Revision: 117896
URL: http://llvm.org/viewvc/llvm-project?rev=117896&view=rev
Log:
Fixed StackFrame::GetVariableList to add global
variables to the list of found variables if they
have not yet been added.
Modified:
lldb/trunk/source/Target/StackFrame.cpp
Modified: lldb/trunk/source/Target/StackFrame.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/StackFrame.cpp?rev=117896&r1=117895&r2=117896&view=diff
==============================================================================
--- lldb/trunk/source/Target/StackFrame.cpp (original)
+++ lldb/trunk/source/Target/StackFrame.cpp Sun Oct 31 23:38:59 2010
@@ -36,6 +36,7 @@
#define RESOLVED_FRAME_ID_SYMBOL_SCOPE (RESOLVED_FRAME_CODE_ADDR << 1)
#define GOT_FRAME_BASE (RESOLVED_FRAME_ID_SYMBOL_SCOPE << 1)
#define RESOLVED_VARIABLES (GOT_FRAME_BASE << 1)
+#define RESOLVED_GLOBAL_VARIABLES (RESOLVED_VARIABLES << 1)
StackFrame::StackFrame
(
@@ -454,22 +455,26 @@
const bool can_create = true;
m_variable_list_sp = frame_block->GetVariableList (get_child_variables, can_create);
}
+ }
+
+ if (m_flags.IsClear(RESOLVED_GLOBAL_VARIABLES) &&
+ get_file_globals)
+ {
+ m_flags.Set(RESOLVED_GLOBAL_VARIABLES);
- if (get_file_globals)
+ if (m_flags.IsClear (eSymbolContextCompUnit))
+ GetSymbolContext (eSymbolContextCompUnit);
+
+ if (m_sc.comp_unit)
{
- if (m_flags.IsClear (eSymbolContextCompUnit))
- GetSymbolContext (eSymbolContextCompUnit);
-
- if (m_sc.comp_unit)
- {
- VariableListSP global_variable_list_sp (m_sc.comp_unit->GetVariableList(true));
- if (m_variable_list_sp)
- m_variable_list_sp->AddVariables (global_variable_list_sp.get());
- else
- m_variable_list_sp = global_variable_list_sp;
- }
+ VariableListSP global_variable_list_sp (m_sc.comp_unit->GetVariableList(true));
+ if (m_variable_list_sp)
+ m_variable_list_sp->AddVariables (global_variable_list_sp.get());
+ else
+ m_variable_list_sp = global_variable_list_sp;
}
}
+
return m_variable_list_sp.get();
}
More information about the lldb-commits
mailing list