Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 | [diff] [blame] | 1 | //===-- StackFrame.cpp ------------------------------------------*- C++ -*-===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | |
| 10 | #include "lldb/Target/StackFrame.h" |
| 11 | |
| 12 | // C Includes |
| 13 | // C++ Includes |
| 14 | // Other libraries and framework includes |
| 15 | // Project includes |
| 16 | #include "lldb/Core/Module.h" |
Greg Clayton | 0603aa9 | 2010-10-04 01:05:56 | [diff] [blame^] | 17 | #include "lldb/Core/Debugger.h" |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 | [diff] [blame] | 18 | #include "lldb/Core/Disassembler.h" |
| 19 | #include "lldb/Core/Value.h" |
Greg Clayton | 288bdf9 | 2010-09-02 02:59:18 | [diff] [blame] | 20 | #include "lldb/Core/ValueObjectVariable.h" |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 | [diff] [blame] | 21 | #include "lldb/Symbol/Function.h" |
Greg Clayton | 288bdf9 | 2010-09-02 02:59:18 | [diff] [blame] | 22 | #include "lldb/Symbol/VariableList.h" |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 | [diff] [blame] | 23 | #include "lldb/Target/ExecutionContext.h" |
| 24 | #include "lldb/Target/Process.h" |
| 25 | #include "lldb/Target/RegisterContext.h" |
| 26 | #include "lldb/Target/Target.h" |
| 27 | #include "lldb/Target/Thread.h" |
| 28 | |
| 29 | using namespace lldb; |
| 30 | using namespace lldb_private; |
| 31 | |
| 32 | // The first bits in the flags are reserved for the SymbolContext::Scope bits |
| 33 | // so we know if we have tried to look up information in our internal symbol |
| 34 | // context (m_sc) already. |
Greg Clayton | 59e8fc1c | 2010-08-30 18:11:35 | [diff] [blame] | 35 | #define RESOLVED_FRAME_CODE_ADDR (uint32_t(eSymbolContextEverything + 1)) |
Greg Clayton | 6dadd50 | 2010-09-02 21:44:10 | [diff] [blame] | 36 | #define RESOLVED_FRAME_ID_SYMBOL_SCOPE (RESOLVED_FRAME_CODE_ADDR << 1) |
Greg Clayton | 59e8fc1c | 2010-08-30 18:11:35 | [diff] [blame] | 37 | #define GOT_FRAME_BASE (RESOLVED_FRAME_ID_SYMBOL_SCOPE << 1) |
| 38 | #define RESOLVED_VARIABLES (GOT_FRAME_BASE << 1) |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 | [diff] [blame] | 39 | |
Greg Clayton | 1b72fcb | 2010-08-24 00:45:41 | [diff] [blame] | 40 | StackFrame::StackFrame |
| 41 | ( |
| 42 | lldb::user_id_t frame_idx, |
Greg Clayton | 59e8fc1c | 2010-08-30 18:11:35 | [diff] [blame] | 43 | lldb::user_id_t unwind_frame_index, |
Greg Clayton | 1b72fcb | 2010-08-24 00:45:41 | [diff] [blame] | 44 | Thread &thread, |
| 45 | lldb::addr_t cfa, |
Greg Clayton | 1b72fcb | 2010-08-24 00:45:41 | [diff] [blame] | 46 | lldb::addr_t pc, |
| 47 | const SymbolContext *sc_ptr |
| 48 | ) : |
| 49 | m_frame_index (frame_idx), |
Greg Clayton | 59e8fc1c | 2010-08-30 18:11:35 | [diff] [blame] | 50 | m_unwind_frame_index (unwind_frame_index), |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 | [diff] [blame] | 51 | m_thread (thread), |
Greg Clayton | 1b72fcb | 2010-08-24 00:45:41 | [diff] [blame] | 52 | m_reg_context_sp (), |
Greg Clayton | 6dadd50 | 2010-09-02 21:44:10 | [diff] [blame] | 53 | m_id (pc, cfa, NULL), |
Greg Clayton | 12fc3e0 | 2010-08-26 22:05:43 | [diff] [blame] | 54 | m_frame_code_addr (NULL, pc), |
Greg Clayton | 1b72fcb | 2010-08-24 00:45:41 | [diff] [blame] | 55 | m_sc (), |
| 56 | m_flags (), |
| 57 | m_frame_base (), |
| 58 | m_frame_base_error (), |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 | [diff] [blame] | 59 | m_variable_list_sp (), |
Greg Clayton | 288bdf9 | 2010-09-02 02:59:18 | [diff] [blame] | 60 | m_variable_list_value_objects () |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 | [diff] [blame] | 61 | { |
| 62 | if (sc_ptr != NULL) |
Greg Clayton | 1b72fcb | 2010-08-24 00:45:41 | [diff] [blame] | 63 | { |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 | [diff] [blame] | 64 | m_sc = *sc_ptr; |
Greg Clayton | 1b72fcb | 2010-08-24 00:45:41 | [diff] [blame] | 65 | m_flags.Set(m_sc.GetResolvedMask ()); |
| 66 | } |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 | [diff] [blame] | 67 | } |
| 68 | |
Greg Clayton | 1b72fcb | 2010-08-24 00:45:41 | [diff] [blame] | 69 | StackFrame::StackFrame |
| 70 | ( |
| 71 | lldb::user_id_t frame_idx, |
Greg Clayton | 59e8fc1c | 2010-08-30 18:11:35 | [diff] [blame] | 72 | lldb::user_id_t unwind_frame_index, |
Greg Clayton | 1b72fcb | 2010-08-24 00:45:41 | [diff] [blame] | 73 | Thread &thread, |
| 74 | const RegisterContextSP ®_context_sp, |
| 75 | lldb::addr_t cfa, |
Greg Clayton | 1b72fcb | 2010-08-24 00:45:41 | [diff] [blame] | 76 | lldb::addr_t pc, |
| 77 | const SymbolContext *sc_ptr |
| 78 | ) : |
| 79 | m_frame_index (frame_idx), |
Greg Clayton | 59e8fc1c | 2010-08-30 18:11:35 | [diff] [blame] | 80 | m_unwind_frame_index (unwind_frame_index), |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 | [diff] [blame] | 81 | m_thread (thread), |
Greg Clayton | 1b72fcb | 2010-08-24 00:45:41 | [diff] [blame] | 82 | m_reg_context_sp (reg_context_sp), |
Greg Clayton | 6dadd50 | 2010-09-02 21:44:10 | [diff] [blame] | 83 | m_id (pc, cfa, NULL), |
Greg Clayton | 12fc3e0 | 2010-08-26 22:05:43 | [diff] [blame] | 84 | m_frame_code_addr (NULL, pc), |
Greg Clayton | 1b72fcb | 2010-08-24 00:45:41 | [diff] [blame] | 85 | m_sc (), |
| 86 | m_flags (), |
| 87 | m_frame_base (), |
| 88 | m_frame_base_error (), |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 | [diff] [blame] | 89 | m_variable_list_sp (), |
Greg Clayton | 288bdf9 | 2010-09-02 02:59:18 | [diff] [blame] | 90 | m_variable_list_value_objects () |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 | [diff] [blame] | 91 | { |
| 92 | if (sc_ptr != NULL) |
Greg Clayton | 1b72fcb | 2010-08-24 00:45:41 | [diff] [blame] | 93 | { |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 | [diff] [blame] | 94 | m_sc = *sc_ptr; |
Greg Clayton | 1b72fcb | 2010-08-24 00:45:41 | [diff] [blame] | 95 | m_flags.Set(m_sc.GetResolvedMask ()); |
| 96 | } |
| 97 | |
| 98 | if (reg_context_sp && !m_sc.target_sp) |
| 99 | { |
| 100 | m_sc.target_sp = reg_context_sp->GetThread().GetProcess().GetTarget().GetSP(); |
| 101 | m_flags.Set (eSymbolContextTarget); |
| 102 | } |
| 103 | } |
| 104 | |
| 105 | StackFrame::StackFrame |
| 106 | ( |
| 107 | lldb::user_id_t frame_idx, |
Greg Clayton | 59e8fc1c | 2010-08-30 18:11:35 | [diff] [blame] | 108 | lldb::user_id_t unwind_frame_index, |
Greg Clayton | 1b72fcb | 2010-08-24 00:45:41 | [diff] [blame] | 109 | Thread &thread, |
| 110 | const RegisterContextSP ®_context_sp, |
| 111 | lldb::addr_t cfa, |
Greg Clayton | 1b72fcb | 2010-08-24 00:45:41 | [diff] [blame] | 112 | const Address& pc_addr, |
| 113 | const SymbolContext *sc_ptr |
| 114 | ) : |
| 115 | m_frame_index (frame_idx), |
Greg Clayton | 59e8fc1c | 2010-08-30 18:11:35 | [diff] [blame] | 116 | m_unwind_frame_index (unwind_frame_index), |
Greg Clayton | 1b72fcb | 2010-08-24 00:45:41 | [diff] [blame] | 117 | m_thread (thread), |
| 118 | m_reg_context_sp (reg_context_sp), |
Greg Clayton | f5e56de | 2010-09-14 23:36:40 | [diff] [blame] | 119 | m_id (pc_addr.GetLoadAddress (&thread.GetProcess().GetTarget()), cfa, NULL), |
Greg Clayton | 12fc3e0 | 2010-08-26 22:05:43 | [diff] [blame] | 120 | m_frame_code_addr (pc_addr), |
Greg Clayton | 1b72fcb | 2010-08-24 00:45:41 | [diff] [blame] | 121 | m_sc (), |
| 122 | m_flags (), |
| 123 | m_frame_base (), |
| 124 | m_frame_base_error (), |
| 125 | m_variable_list_sp (), |
Greg Clayton | 288bdf9 | 2010-09-02 02:59:18 | [diff] [blame] | 126 | m_variable_list_value_objects () |
Greg Clayton | 1b72fcb | 2010-08-24 00:45:41 | [diff] [blame] | 127 | { |
| 128 | if (sc_ptr != NULL) |
| 129 | { |
| 130 | m_sc = *sc_ptr; |
| 131 | m_flags.Set(m_sc.GetResolvedMask ()); |
| 132 | } |
| 133 | |
| 134 | if (m_sc.target_sp.get() == NULL && reg_context_sp) |
| 135 | { |
| 136 | m_sc.target_sp = reg_context_sp->GetThread().GetProcess().GetTarget().GetSP(); |
| 137 | m_flags.Set (eSymbolContextTarget); |
| 138 | } |
| 139 | |
Greg Clayton | ffc1d66 | 2010-09-13 04:34:30 | [diff] [blame] | 140 | Module *pc_module = pc_addr.GetModule(); |
| 141 | if (m_sc.module_sp.get() == NULL || m_sc.module_sp.get() != pc_module) |
Greg Clayton | 1b72fcb | 2010-08-24 00:45:41 | [diff] [blame] | 142 | { |
Greg Clayton | 1b72fcb | 2010-08-24 00:45:41 | [diff] [blame] | 143 | if (pc_module) |
| 144 | { |
| 145 | m_sc.module_sp = pc_module->GetSP(); |
| 146 | m_flags.Set (eSymbolContextModule); |
| 147 | } |
Greg Clayton | ffc1d66 | 2010-09-13 04:34:30 | [diff] [blame] | 148 | else |
| 149 | { |
| 150 | m_sc.module_sp.reset(); |
| 151 | } |
| 152 | |
Greg Clayton | 1b72fcb | 2010-08-24 00:45:41 | [diff] [blame] | 153 | } |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 | [diff] [blame] | 154 | } |
| 155 | |
| 156 | |
| 157 | //---------------------------------------------------------------------- |
| 158 | // Destructor |
| 159 | //---------------------------------------------------------------------- |
| 160 | StackFrame::~StackFrame() |
| 161 | { |
| 162 | } |
| 163 | |
| 164 | StackID& |
| 165 | StackFrame::GetStackID() |
| 166 | { |
Greg Clayton | 6dadd50 | 2010-09-02 21:44:10 | [diff] [blame] | 167 | // Make sure we have resolved the StackID object's symbol context scope if |
| 168 | // we already haven't looked it up. |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 | [diff] [blame] | 169 | |
Greg Clayton | 59e8fc1c | 2010-08-30 18:11:35 | [diff] [blame] | 170 | if (m_flags.IsClear (RESOLVED_FRAME_ID_SYMBOL_SCOPE)) |
| 171 | { |
Greg Clayton | 2cad65a | 2010-09-03 17:10:42 | [diff] [blame] | 172 | if (m_id.GetSymbolContextScope ()) |
Greg Clayton | 59e8fc1c | 2010-08-30 18:11:35 | [diff] [blame] | 173 | { |
Greg Clayton | 95897c6 | 2010-09-07 04:20:48 | [diff] [blame] | 174 | // We already have a symbol context scope, we just don't have our |
| 175 | // flag bit set. |
Greg Clayton | 59e8fc1c | 2010-08-30 18:11:35 | [diff] [blame] | 176 | m_flags.Set (RESOLVED_FRAME_ID_SYMBOL_SCOPE); |
| 177 | } |
| 178 | else |
| 179 | { |
Greg Clayton | 95897c6 | 2010-09-07 04:20:48 | [diff] [blame] | 180 | // Calculate the frame block and use this for the stack ID symbol |
| 181 | // context scope if we have one. |
| 182 | SymbolContextScope *scope = GetFrameBlock (); |
| 183 | if (scope == NULL) |
Greg Clayton | 59e8fc1c | 2010-08-30 18:11:35 | [diff] [blame] | 184 | { |
Greg Clayton | 95897c6 | 2010-09-07 04:20:48 | [diff] [blame] | 185 | // We don't have a block, so use the symbol |
| 186 | if (m_flags.IsClear (eSymbolContextSymbol)) |
| 187 | GetSymbolContext (eSymbolContextSymbol); |
| 188 | |
| 189 | // It is ok if m_sc.symbol is NULL here |
| 190 | scope = m_sc.symbol; |
Greg Clayton | 59e8fc1c | 2010-08-30 18:11:35 | [diff] [blame] | 191 | } |
Greg Clayton | 95897c6 | 2010-09-07 04:20:48 | [diff] [blame] | 192 | // Set the symbol context scope (the accessor will set the |
| 193 | // RESOLVED_FRAME_ID_SYMBOL_SCOPE bit in m_flags). |
| 194 | SetSymbolContextScope (scope); |
Greg Clayton | 59e8fc1c | 2010-08-30 18:11:35 | [diff] [blame] | 195 | } |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 | [diff] [blame] | 196 | } |
| 197 | return m_id; |
| 198 | } |
| 199 | |
Greg Clayton | 59e8fc1c | 2010-08-30 18:11:35 | [diff] [blame] | 200 | void |
| 201 | StackFrame::SetSymbolContextScope (SymbolContextScope *symbol_scope) |
| 202 | { |
| 203 | m_flags.Set (RESOLVED_FRAME_ID_SYMBOL_SCOPE); |
| 204 | m_id.SetSymbolContextScope (symbol_scope); |
| 205 | } |
| 206 | |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 | [diff] [blame] | 207 | Address& |
Greg Clayton | 9da7bd0 | 2010-08-24 21:05:24 | [diff] [blame] | 208 | StackFrame::GetFrameCodeAddress() |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 | [diff] [blame] | 209 | { |
Greg Clayton | 59e8fc1c | 2010-08-30 18:11:35 | [diff] [blame] | 210 | if (m_flags.IsClear(RESOLVED_FRAME_CODE_ADDR) && !m_frame_code_addr.IsSectionOffset()) |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 | [diff] [blame] | 211 | { |
Greg Clayton | 59e8fc1c | 2010-08-30 18:11:35 | [diff] [blame] | 212 | m_flags.Set (RESOLVED_FRAME_CODE_ADDR); |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 | [diff] [blame] | 213 | |
| 214 | // Resolve the PC into a temporary address because if ResolveLoadAddress |
| 215 | // fails to resolve the address, it will clear the address object... |
| 216 | Address resolved_pc; |
Greg Clayton | f5e56de | 2010-09-14 23:36:40 | [diff] [blame] | 217 | if (m_thread.GetProcess().GetTarget().GetSectionLoadList().ResolveLoadAddress(m_frame_code_addr.GetOffset(), resolved_pc)) |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 | [diff] [blame] | 218 | { |
Greg Clayton | 12fc3e0 | 2010-08-26 22:05:43 | [diff] [blame] | 219 | m_frame_code_addr = resolved_pc; |
| 220 | const Section *section = m_frame_code_addr.GetSection(); |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 | [diff] [blame] | 221 | if (section) |
| 222 | { |
| 223 | Module *module = section->GetModule(); |
| 224 | if (module) |
| 225 | { |
| 226 | m_sc.module_sp = module->GetSP(); |
| 227 | if (m_sc.module_sp) |
| 228 | m_flags.Set(eSymbolContextModule); |
| 229 | } |
| 230 | } |
| 231 | } |
| 232 | } |
Greg Clayton | 12fc3e0 | 2010-08-26 22:05:43 | [diff] [blame] | 233 | return m_frame_code_addr; |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 | [diff] [blame] | 234 | } |
| 235 | |
| 236 | void |
| 237 | StackFrame::ChangePC (addr_t pc) |
| 238 | { |
Greg Clayton | 12fc3e0 | 2010-08-26 22:05:43 | [diff] [blame] | 239 | m_frame_code_addr.SetOffset(pc); |
| 240 | m_frame_code_addr.SetSection(NULL); |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 | [diff] [blame] | 241 | m_sc.Clear(); |
| 242 | m_flags.SetAllFlagBits(0); |
| 243 | m_thread.ClearStackFrames (); |
| 244 | } |
| 245 | |
| 246 | const char * |
| 247 | StackFrame::Disassemble () |
| 248 | { |
| 249 | if (m_disassembly.GetSize() == 0) |
| 250 | { |
| 251 | ExecutionContext exe_ctx; |
Greg Clayton | 0603aa9 | 2010-10-04 01:05:56 | [diff] [blame^] | 252 | CalculateExecutionContext(exe_ctx); |
Greg Clayton | 6611103 | 2010-06-23 01:19:29 | [diff] [blame] | 253 | Target &target = m_thread.GetProcess().GetTarget(); |
| 254 | Disassembler::Disassemble (target.GetDebugger(), |
| 255 | target.GetArchitecture(), |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 | [diff] [blame] | 256 | exe_ctx, |
| 257 | 0, |
Greg Clayton | dda4f7b | 2010-06-30 23:03:03 | [diff] [blame] | 258 | false, |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 | [diff] [blame] | 259 | m_disassembly); |
| 260 | if (m_disassembly.GetSize() == 0) |
| 261 | return NULL; |
| 262 | } |
| 263 | return m_disassembly.GetData(); |
| 264 | } |
| 265 | |
Greg Clayton | 95897c6 | 2010-09-07 04:20:48 | [diff] [blame] | 266 | Block * |
| 267 | StackFrame::GetFrameBlock () |
| 268 | { |
| 269 | if (m_sc.block == NULL && m_flags.IsClear (eSymbolContextBlock)) |
| 270 | GetSymbolContext (eSymbolContextBlock); |
| 271 | |
| 272 | if (m_sc.block) |
| 273 | { |
| 274 | Block *inline_block = m_sc.block->GetContainingInlinedBlock(); |
| 275 | if (inline_block) |
| 276 | { |
| 277 | // Use the block with the inlined function info |
| 278 | // as the frame block we want this frame to have only the variables |
| 279 | // for the inlined function and its non-inlined block child blocks. |
| 280 | return inline_block; |
| 281 | } |
| 282 | else |
| 283 | { |
| 284 | // This block is not contained withing any inlined function blocks |
| 285 | // with so we want to use the top most function block. |
| 286 | return &m_sc.function->GetBlock (false); |
| 287 | } |
| 288 | } |
| 289 | return NULL; |
| 290 | } |
| 291 | |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 | [diff] [blame] | 292 | //---------------------------------------------------------------------- |
| 293 | // Get the symbol context if we already haven't done so by resolving the |
| 294 | // PC address as much as possible. This way when we pass around a |
| 295 | // StackFrame object, everyone will have as much information as |
| 296 | // possible and no one will ever have to look things up manually. |
| 297 | //---------------------------------------------------------------------- |
| 298 | const SymbolContext& |
| 299 | StackFrame::GetSymbolContext (uint32_t resolve_scope) |
| 300 | { |
| 301 | // Copy our internal symbol context into "sc". |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 | [diff] [blame] | 302 | if ((m_flags.GetAllFlagBits() & resolve_scope) != resolve_scope) |
| 303 | { |
| 304 | // Resolve our PC to section offset if we haven't alreday done so |
| 305 | // and if we don't have a module. The resolved address section will |
| 306 | // contain the module to which it belongs |
Greg Clayton | 59e8fc1c | 2010-08-30 18:11:35 | [diff] [blame] | 307 | if (!m_sc.module_sp && m_flags.IsClear(RESOLVED_FRAME_CODE_ADDR)) |
Greg Clayton | 9da7bd0 | 2010-08-24 21:05:24 | [diff] [blame] | 308 | GetFrameCodeAddress(); |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 | [diff] [blame] | 309 | |
| 310 | // If this is not frame zero, then we need to subtract 1 from the PC |
| 311 | // value when doing address lookups since the PC will be on the |
| 312 | // instruction following the function call instruction... |
| 313 | |
Greg Clayton | 9da7bd0 | 2010-08-24 21:05:24 | [diff] [blame] | 314 | Address lookup_addr(GetFrameCodeAddress()); |
Greg Clayton | 1b72fcb | 2010-08-24 00:45:41 | [diff] [blame] | 315 | if (m_frame_index > 0 && lookup_addr.IsValid()) |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 | [diff] [blame] | 316 | { |
| 317 | addr_t offset = lookup_addr.GetOffset(); |
| 318 | if (offset > 0) |
| 319 | lookup_addr.SetOffset(offset - 1); |
| 320 | } |
| 321 | |
Greg Clayton | 9da7bd0 | 2010-08-24 21:05:24 | [diff] [blame] | 322 | |
| 323 | uint32_t resolved = 0; |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 | [diff] [blame] | 324 | if (m_sc.module_sp) |
| 325 | { |
| 326 | // We have something in our stack frame symbol context, lets check |
| 327 | // if we haven't already tried to lookup one of those things. If we |
| 328 | // haven't then we will do the query. |
Greg Clayton | 1b72fcb | 2010-08-24 00:45:41 | [diff] [blame] | 329 | |
| 330 | uint32_t actual_resolve_scope = 0; |
| 331 | |
| 332 | if (resolve_scope & eSymbolContextCompUnit) |
| 333 | { |
| 334 | if (m_flags.IsClear (eSymbolContextCompUnit)) |
| 335 | { |
| 336 | if (m_sc.comp_unit) |
Greg Clayton | 9da7bd0 | 2010-08-24 21:05:24 | [diff] [blame] | 337 | resolved |= eSymbolContextCompUnit; |
Greg Clayton | 1b72fcb | 2010-08-24 00:45:41 | [diff] [blame] | 338 | else |
| 339 | actual_resolve_scope |= eSymbolContextCompUnit; |
| 340 | } |
| 341 | } |
| 342 | |
| 343 | if (resolve_scope & eSymbolContextFunction) |
| 344 | { |
| 345 | if (m_flags.IsClear (eSymbolContextFunction)) |
| 346 | { |
| 347 | if (m_sc.function) |
Greg Clayton | 9da7bd0 | 2010-08-24 21:05:24 | [diff] [blame] | 348 | resolved |= eSymbolContextFunction; |
Greg Clayton | 1b72fcb | 2010-08-24 00:45:41 | [diff] [blame] | 349 | else |
| 350 | actual_resolve_scope |= eSymbolContextFunction; |
| 351 | } |
| 352 | } |
| 353 | |
| 354 | if (resolve_scope & eSymbolContextBlock) |
| 355 | { |
| 356 | if (m_flags.IsClear (eSymbolContextBlock)) |
| 357 | { |
| 358 | if (m_sc.block) |
Greg Clayton | 9da7bd0 | 2010-08-24 21:05:24 | [diff] [blame] | 359 | resolved |= eSymbolContextBlock; |
Greg Clayton | 1b72fcb | 2010-08-24 00:45:41 | [diff] [blame] | 360 | else |
| 361 | actual_resolve_scope |= eSymbolContextBlock; |
| 362 | } |
| 363 | } |
| 364 | |
| 365 | if (resolve_scope & eSymbolContextSymbol) |
| 366 | { |
| 367 | if (m_flags.IsClear (eSymbolContextSymbol)) |
| 368 | { |
| 369 | if (m_sc.symbol) |
Greg Clayton | 9da7bd0 | 2010-08-24 21:05:24 | [diff] [blame] | 370 | resolved |= eSymbolContextSymbol; |
Greg Clayton | 1b72fcb | 2010-08-24 00:45:41 | [diff] [blame] | 371 | else |
| 372 | actual_resolve_scope |= eSymbolContextSymbol; |
| 373 | } |
| 374 | } |
| 375 | |
| 376 | if (resolve_scope & eSymbolContextLineEntry) |
| 377 | { |
| 378 | if (m_flags.IsClear (eSymbolContextLineEntry)) |
| 379 | { |
| 380 | if (m_sc.line_entry.IsValid()) |
Greg Clayton | 9da7bd0 | 2010-08-24 21:05:24 | [diff] [blame] | 381 | resolved |= eSymbolContextLineEntry; |
Greg Clayton | 1b72fcb | 2010-08-24 00:45:41 | [diff] [blame] | 382 | else |
| 383 | actual_resolve_scope |= eSymbolContextLineEntry; |
| 384 | } |
| 385 | } |
| 386 | |
| 387 | if (actual_resolve_scope) |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 | [diff] [blame] | 388 | { |
| 389 | // We might be resolving less information than what is already |
| 390 | // in our current symbol context so resolve into a temporary |
| 391 | // symbol context "sc" so we don't clear out data we have |
| 392 | // already found in "m_sc" |
| 393 | SymbolContext sc; |
| 394 | // Set flags that indicate what we have tried to resolve |
Greg Clayton | 9da7bd0 | 2010-08-24 21:05:24 | [diff] [blame] | 395 | resolved |= m_sc.module_sp->ResolveSymbolContextForAddress (lookup_addr, actual_resolve_scope, sc); |
Greg Clayton | 1b72fcb | 2010-08-24 00:45:41 | [diff] [blame] | 396 | // Only replace what we didn't already have as we may have |
| 397 | // information for an inlined function scope that won't match |
| 398 | // what a standard lookup by address would match |
Greg Clayton | 9da7bd0 | 2010-08-24 21:05:24 | [diff] [blame] | 399 | if ((resolved & eSymbolContextCompUnit) && m_sc.comp_unit == NULL) |
| 400 | m_sc.comp_unit = sc.comp_unit; |
| 401 | if ((resolved & eSymbolContextFunction) && m_sc.function == NULL) |
| 402 | m_sc.function = sc.function; |
| 403 | if ((resolved & eSymbolContextBlock) && m_sc.block == NULL) |
| 404 | m_sc.block = sc.block; |
| 405 | if ((resolved & eSymbolContextSymbol) && m_sc.symbol == NULL) |
| 406 | m_sc.symbol = sc.symbol; |
| 407 | if ((resolved & eSymbolContextLineEntry) && !m_sc.line_entry.IsValid()) |
| 408 | m_sc.line_entry = sc.line_entry; |
| 409 | |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 | [diff] [blame] | 410 | } |
| 411 | } |
| 412 | else |
| 413 | { |
| 414 | // If we don't have a module, then we can't have the compile unit, |
| 415 | // function, block, line entry or symbol, so we can safely call |
| 416 | // ResolveSymbolContextForAddress with our symbol context member m_sc. |
Greg Clayton | 9da7bd0 | 2010-08-24 21:05:24 | [diff] [blame] | 417 | resolved |= m_thread.GetProcess().GetTarget().GetImages().ResolveSymbolContextForAddress (lookup_addr, resolve_scope, m_sc); |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 | [diff] [blame] | 418 | } |
| 419 | |
| 420 | // If the target was requested add that: |
| 421 | if (m_sc.target_sp.get() == NULL) |
Greg Clayton | 9da7bd0 | 2010-08-24 21:05:24 | [diff] [blame] | 422 | { |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 | [diff] [blame] | 423 | m_sc.target_sp = CalculateProcess()->GetTarget().GetSP(); |
Greg Clayton | 9da7bd0 | 2010-08-24 21:05:24 | [diff] [blame] | 424 | if (m_sc.target_sp) |
| 425 | resolved |= eSymbolContextTarget; |
| 426 | } |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 | [diff] [blame] | 427 | |
| 428 | // Update our internal flags so we remember what we have tried to locate so |
| 429 | // we don't have to keep trying when more calls to this function are made. |
Greg Clayton | 9da7bd0 | 2010-08-24 21:05:24 | [diff] [blame] | 430 | // We might have dug up more information that was requested (for example |
| 431 | // if we were asked to only get the block, we will have gotten the |
| 432 | // compile unit, and function) so set any additional bits that we resolved |
| 433 | m_flags.Set (resolve_scope | resolved); |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 | [diff] [blame] | 434 | } |
| 435 | |
| 436 | // Return the symbol context with everything that was possible to resolve |
| 437 | // resolved. |
| 438 | return m_sc; |
| 439 | } |
| 440 | |
| 441 | |
| 442 | VariableList * |
Greg Clayton | 288bdf9 | 2010-09-02 02:59:18 | [diff] [blame] | 443 | StackFrame::GetVariableList (bool get_file_globals) |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 | [diff] [blame] | 444 | { |
| 445 | if (m_flags.IsClear(RESOLVED_VARIABLES)) |
| 446 | { |
| 447 | m_flags.Set(RESOLVED_VARIABLES); |
| 448 | |
Greg Clayton | 95897c6 | 2010-09-07 04:20:48 | [diff] [blame] | 449 | Block *frame_block = GetFrameBlock(); |
| 450 | |
| 451 | if (frame_block) |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 | [diff] [blame] | 452 | { |
Greg Clayton | 95897c6 | 2010-09-07 04:20:48 | [diff] [blame] | 453 | const bool get_child_variables = true; |
| 454 | const bool can_create = true; |
| 455 | m_variable_list_sp = frame_block->GetVariableList (get_child_variables, can_create); |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 | [diff] [blame] | 456 | } |
Greg Clayton | 288bdf9 | 2010-09-02 02:59:18 | [diff] [blame] | 457 | |
Greg Clayton | 95897c6 | 2010-09-07 04:20:48 | [diff] [blame] | 458 | if (get_file_globals) |
Greg Clayton | 288bdf9 | 2010-09-02 02:59:18 | [diff] [blame] | 459 | { |
Greg Clayton | 95897c6 | 2010-09-07 04:20:48 | [diff] [blame] | 460 | if (m_flags.IsClear (eSymbolContextCompUnit)) |
| 461 | GetSymbolContext (eSymbolContextCompUnit); |
| 462 | |
| 463 | if (m_sc.comp_unit) |
| 464 | { |
| 465 | VariableListSP global_variable_list_sp (m_sc.comp_unit->GetVariableList(true)); |
| 466 | if (m_variable_list_sp) |
| 467 | m_variable_list_sp->AddVariables (global_variable_list_sp.get()); |
| 468 | else |
| 469 | m_variable_list_sp = global_variable_list_sp; |
| 470 | } |
Greg Clayton | 288bdf9 | 2010-09-02 02:59:18 | [diff] [blame] | 471 | } |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 | [diff] [blame] | 472 | } |
| 473 | return m_variable_list_sp.get(); |
| 474 | } |
| 475 | |
| 476 | |
| 477 | bool |
| 478 | StackFrame::GetFrameBaseValue (Scalar &frame_base, Error *error_ptr) |
| 479 | { |
| 480 | if (m_flags.IsClear(GOT_FRAME_BASE)) |
| 481 | { |
| 482 | if (m_sc.function) |
| 483 | { |
| 484 | m_frame_base.Clear(); |
| 485 | m_frame_base_error.Clear(); |
| 486 | |
| 487 | m_flags.Set(GOT_FRAME_BASE); |
| 488 | ExecutionContext exe_ctx (&m_thread.GetProcess(), &m_thread, this); |
| 489 | Value expr_value; |
Greg Clayton | 016a95e | 2010-09-14 02:20:48 | [diff] [blame] | 490 | addr_t loclist_base_addr = LLDB_INVALID_ADDRESS; |
| 491 | if (m_sc.function->GetFrameBaseExpression().IsLocationList()) |
Greg Clayton | f5e56de | 2010-09-14 23:36:40 | [diff] [blame] | 492 | loclist_base_addr = m_sc.function->GetAddressRange().GetBaseAddress().GetLoadAddress (&m_thread.GetProcess().GetTarget()); |
Greg Clayton | 016a95e | 2010-09-14 02:20:48 | [diff] [blame] | 493 | |
| 494 | if (m_sc.function->GetFrameBaseExpression().Evaluate(&exe_ctx, NULL, loclist_base_addr, NULL, expr_value, &m_frame_base_error) == false) |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 | [diff] [blame] | 495 | { |
| 496 | // We should really have an error if evaluate returns, but in case |
| 497 | // we don't, lets set the error to something at least. |
| 498 | if (m_frame_base_error.Success()) |
| 499 | m_frame_base_error.SetErrorString("Evaluation of the frame base expression failed."); |
| 500 | } |
| 501 | else |
| 502 | { |
| 503 | m_frame_base = expr_value.ResolveValue(&exe_ctx, NULL); |
| 504 | } |
| 505 | } |
| 506 | else |
| 507 | { |
| 508 | m_frame_base_error.SetErrorString ("No function in symbol context."); |
| 509 | } |
| 510 | } |
| 511 | |
| 512 | if (m_frame_base_error.Success()) |
| 513 | frame_base = m_frame_base; |
| 514 | |
| 515 | if (error_ptr) |
| 516 | *error_ptr = m_frame_base_error; |
| 517 | return m_frame_base_error.Success(); |
| 518 | } |
| 519 | |
| 520 | RegisterContext * |
| 521 | StackFrame::GetRegisterContext () |
| 522 | { |
| 523 | if (m_reg_context_sp.get() == NULL) |
| 524 | m_reg_context_sp.reset (m_thread.CreateRegisterContextForFrame (this)); |
| 525 | return m_reg_context_sp.get(); |
| 526 | } |
| 527 | |
| 528 | bool |
| 529 | StackFrame::HasDebugInformation () |
| 530 | { |
Greg Clayton | 9da7bd0 | 2010-08-24 21:05:24 | [diff] [blame] | 531 | GetSymbolContext (eSymbolContextLineEntry); |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 | [diff] [blame] | 532 | return m_sc.line_entry.IsValid(); |
| 533 | } |
| 534 | |
Greg Clayton | 288bdf9 | 2010-09-02 02:59:18 | [diff] [blame] | 535 | |
| 536 | ValueObjectSP |
| 537 | StackFrame::GetValueObjectForFrameVariable (const VariableSP &variable_sp) |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 | [diff] [blame] | 538 | { |
Greg Clayton | 288bdf9 | 2010-09-02 02:59:18 | [diff] [blame] | 539 | ValueObjectSP valobj_sp; |
| 540 | VariableList *var_list = GetVariableList (true); |
| 541 | if (var_list) |
| 542 | { |
| 543 | // Make sure the variable is a frame variable |
| 544 | const uint32_t var_idx = var_list->FindIndexForVariable (variable_sp.get()); |
| 545 | const uint32_t num_variables = var_list->GetSize(); |
| 546 | if (var_idx < num_variables) |
| 547 | { |
| 548 | valobj_sp = m_variable_list_value_objects.GetValueObjectAtIndex (var_idx); |
| 549 | if (valobj_sp.get() == NULL) |
| 550 | { |
| 551 | if (m_variable_list_value_objects.GetSize() < num_variables) |
| 552 | m_variable_list_value_objects.Resize(num_variables); |
| 553 | valobj_sp.reset (new ValueObjectVariable (variable_sp)); |
| 554 | m_variable_list_value_objects.SetValueObjectAtIndex (var_idx, valobj_sp); |
| 555 | } |
| 556 | } |
| 557 | } |
| 558 | return valobj_sp; |
| 559 | } |
| 560 | |
| 561 | ValueObjectSP |
| 562 | StackFrame::TrackGlobalVariable (const VariableSP &variable_sp) |
| 563 | { |
| 564 | // Check to make sure we aren't already tracking this variable? |
| 565 | ValueObjectSP valobj_sp (GetValueObjectForFrameVariable (variable_sp)); |
| 566 | if (!valobj_sp) |
| 567 | { |
| 568 | // We aren't already tracking this global |
| 569 | VariableList *var_list = GetVariableList (true); |
| 570 | // If this frame has no variables, create a new list |
| 571 | if (var_list == NULL) |
| 572 | m_variable_list_sp.reset (new VariableList()); |
| 573 | |
| 574 | // Add the global/static variable to this frame |
| 575 | m_variable_list_sp->AddVariable (variable_sp); |
| 576 | |
| 577 | // Now make a value object for it so we can track its changes |
| 578 | valobj_sp = GetValueObjectForFrameVariable (variable_sp); |
| 579 | } |
| 580 | return valobj_sp; |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 | [diff] [blame] | 581 | } |
| 582 | |
Jim Ingham | 6b8379c | 2010-08-26 20:44:45 | [diff] [blame] | 583 | bool |
| 584 | StackFrame::IsInlined () |
| 585 | { |
Greg Clayton | 59e8fc1c | 2010-08-30 18:11:35 | [diff] [blame] | 586 | if (m_sc.block == NULL) |
| 587 | GetSymbolContext (eSymbolContextBlock); |
| 588 | if (m_sc.block) |
| 589 | return m_sc.block->GetContainingInlinedBlock() != NULL; |
| 590 | return false; |
Jim Ingham | 6b8379c | 2010-08-26 20:44:45 | [diff] [blame] | 591 | } |
| 592 | |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 | [diff] [blame] | 593 | Target * |
| 594 | StackFrame::CalculateTarget () |
| 595 | { |
| 596 | return m_thread.CalculateTarget(); |
| 597 | } |
| 598 | |
| 599 | Process * |
| 600 | StackFrame::CalculateProcess () |
| 601 | { |
| 602 | return m_thread.CalculateProcess(); |
| 603 | } |
| 604 | |
| 605 | Thread * |
| 606 | StackFrame::CalculateThread () |
| 607 | { |
| 608 | return &m_thread; |
| 609 | } |
| 610 | |
| 611 | StackFrame * |
| 612 | StackFrame::CalculateStackFrame () |
| 613 | { |
| 614 | return this; |
| 615 | } |
| 616 | |
| 617 | |
| 618 | void |
Greg Clayton | 0603aa9 | 2010-10-04 01:05:56 | [diff] [blame^] | 619 | StackFrame::CalculateExecutionContext (ExecutionContext &exe_ctx) |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 | [diff] [blame] | 620 | { |
Greg Clayton | 0603aa9 | 2010-10-04 01:05:56 | [diff] [blame^] | 621 | m_thread.CalculateExecutionContext (exe_ctx); |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 | [diff] [blame] | 622 | exe_ctx.frame = this; |
| 623 | } |
| 624 | |
| 625 | void |
Greg Clayton | 0603aa9 | 2010-10-04 01:05:56 | [diff] [blame^] | 626 | StackFrame::DumpUsingSettingsFormat (Stream *strm) |
| 627 | { |
| 628 | if (strm == NULL) |
| 629 | return; |
| 630 | |
| 631 | GetSymbolContext(eSymbolContextEverything); |
| 632 | ExecutionContext exe_ctx; |
| 633 | CalculateExecutionContext(exe_ctx); |
| 634 | const char *end = NULL; |
| 635 | StreamString s; |
| 636 | const char *frame_format = m_thread.GetProcess().GetTarget().GetDebugger().GetFrameFormat(); |
| 637 | if (frame_format && Debugger::FormatPrompt (frame_format, &m_sc, &exe_ctx, NULL, s, &end)) |
| 638 | { |
| 639 | strm->Write(s.GetData(), s.GetSize()); |
| 640 | } |
| 641 | else |
| 642 | { |
| 643 | Dump (strm, true, false); |
| 644 | strm->EOL(); |
| 645 | } |
| 646 | } |
| 647 | |
| 648 | void |
Greg Clayton | 6dadd50 | 2010-09-02 21:44:10 | [diff] [blame] | 649 | StackFrame::Dump (Stream *strm, bool show_frame_index, bool show_fullpaths) |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 | [diff] [blame] | 650 | { |
| 651 | if (strm == NULL) |
| 652 | return; |
| 653 | |
| 654 | if (show_frame_index) |
Greg Clayton | 1b72fcb | 2010-08-24 00:45:41 | [diff] [blame] | 655 | strm->Printf("frame #%u: ", m_frame_index); |
Greg Clayton | f5e56de | 2010-09-14 23:36:40 | [diff] [blame] | 656 | strm->Printf("0x%0*llx ", m_thread.GetProcess().GetAddressByteSize() * 2, GetFrameCodeAddress().GetLoadAddress(&m_thread.GetProcess().GetTarget())); |
Greg Clayton | 9da7bd0 | 2010-08-24 21:05:24 | [diff] [blame] | 657 | GetSymbolContext(eSymbolContextEverything); |
Greg Clayton | 1b72fcb | 2010-08-24 00:45:41 | [diff] [blame] | 658 | const bool show_module = true; |
| 659 | const bool show_inline = true; |
Greg Clayton | 6dadd50 | 2010-09-02 21:44:10 | [diff] [blame] | 660 | m_sc.DumpStopContext(strm, &m_thread.GetProcess(), GetFrameCodeAddress(), show_fullpaths, show_module, show_inline); |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 | [diff] [blame] | 661 | } |
| 662 | |
Greg Clayton | 5082c5f | 2010-08-27 18:24:16 | [diff] [blame] | 663 | void |
Greg Clayton | 59e8fc1c | 2010-08-30 18:11:35 | [diff] [blame] | 664 | StackFrame::UpdateCurrentFrameFromPreviousFrame (StackFrame &prev_frame) |
Greg Clayton | 5082c5f | 2010-08-27 18:24:16 | [diff] [blame] | 665 | { |
Greg Clayton | 59e8fc1c | 2010-08-30 18:11:35 | [diff] [blame] | 666 | assert (GetStackID() == prev_frame.GetStackID()); // TODO: remove this after some testing |
| 667 | m_variable_list_sp = prev_frame.m_variable_list_sp; |
Greg Clayton | 288bdf9 | 2010-09-02 02:59:18 | [diff] [blame] | 668 | m_variable_list_value_objects.Swap (prev_frame.m_variable_list_value_objects); |
Greg Clayton | 68275d5 | 2010-08-27 21:47:54 | [diff] [blame] | 669 | if (!m_disassembly.GetString().empty()) |
| 670 | m_disassembly.GetString().swap (m_disassembly.GetString()); |
Greg Clayton | 5082c5f | 2010-08-27 18:24:16 | [diff] [blame] | 671 | } |
Greg Clayton | 68275d5 | 2010-08-27 21:47:54 | [diff] [blame] | 672 | |
| 673 | |
Greg Clayton | 59e8fc1c | 2010-08-30 18:11:35 | [diff] [blame] | 674 | void |
| 675 | StackFrame::UpdatePreviousFrameFromCurrentFrame (StackFrame &curr_frame) |
| 676 | { |
Greg Clayton | 2cad65a | 2010-09-03 17:10:42 | [diff] [blame] | 677 | assert (GetStackID() == curr_frame.GetStackID()); // TODO: remove this after some testing |
| 678 | m_id.SetPC (curr_frame.m_id.GetPC()); // Update the Stack ID PC value |
Greg Clayton | 59e8fc1c | 2010-08-30 18:11:35 | [diff] [blame] | 679 | assert (&m_thread == &curr_frame.m_thread); |
| 680 | m_frame_index = curr_frame.m_frame_index; |
| 681 | m_unwind_frame_index = curr_frame.m_unwind_frame_index; |
| 682 | m_reg_context_sp = curr_frame.m_reg_context_sp; |
| 683 | m_frame_code_addr = curr_frame.m_frame_code_addr; |
| 684 | assert (m_sc.target_sp.get() == NULL || curr_frame.m_sc.target_sp.get() == NULL || m_sc.target_sp.get() == curr_frame.m_sc.target_sp.get()); |
| 685 | assert (m_sc.module_sp.get() == NULL || curr_frame.m_sc.module_sp.get() == NULL || m_sc.module_sp.get() == curr_frame.m_sc.module_sp.get()); |
| 686 | assert (m_sc.comp_unit == NULL || curr_frame.m_sc.comp_unit == NULL || m_sc.comp_unit == curr_frame.m_sc.comp_unit); |
| 687 | assert (m_sc.function == NULL || curr_frame.m_sc.function == NULL || m_sc.function == curr_frame.m_sc.function); |
Greg Clayton | 59e8fc1c | 2010-08-30 18:11:35 | [diff] [blame] | 688 | m_sc = curr_frame.m_sc; |
| 689 | m_flags.Clear(GOT_FRAME_BASE | eSymbolContextEverything); |
| 690 | m_flags.Set (m_sc.GetResolvedMask()); |
| 691 | m_frame_base.Clear(); |
| 692 | m_frame_base_error.Clear(); |
| 693 | } |
| 694 | |
| 695 | |
Greg Clayton | 2cad65a | 2010-09-03 17:10:42 | [diff] [blame] | 696 | bool |
| 697 | StackFrame::HasCachedData () const |
| 698 | { |
| 699 | if (m_variable_list_sp.get()) |
| 700 | return true; |
| 701 | if (m_variable_list_value_objects.GetSize() > 0) |
| 702 | return true; |
| 703 | if (!m_disassembly.GetString().empty()) |
| 704 | return true; |
| 705 | return false; |
Jim Ingham | e4284b7 | 2010-09-23 17:40:12 | [diff] [blame] | 706 | } |
| 707 | |
| 708 | lldb::StackFrameSP |
| 709 | StackFrame::GetSP () |
| 710 | { |
| 711 | return m_thread.GetStackFrameSPForStackFramePtr (this); |
Greg Clayton | 2cad65a | 2010-09-03 17:10:42 | [diff] [blame] | 712 | } |