// Copy our internal symbol context into "sc".
if ((m_flags.Get() & resolve_scope) != resolve_scope)
{
+ uint32_t resolved = 0;
+
+ // If the target was requested add that:
+ if (!m_sc.target_sp)
+ {
+ m_sc.target_sp = CalculateTarget();
+ if (m_sc.target_sp)
+ resolved |= eSymbolContextTarget;
+ }
+
+
// Resolve our PC to section offset if we haven't alreday done so
// and if we don't have a module. The resolved address section will
// contain the module to which it belongs
}
- uint32_t resolved = 0;
if (m_sc.module_sp)
{
// We have something in our stack frame symbol context, lets check
m_sc.block = sc.block;
if ((resolved & eSymbolContextSymbol) && m_sc.symbol == NULL)
m_sc.symbol = sc.symbol;
- if ((resolved & eSymbolContextLineEntry) && !m_sc.line_entry.IsValid())
+ if ((resolved & eSymbolContextLineEntry) && !m_sc.line_entry.IsValid())
+ {
m_sc.line_entry = sc.line_entry;
-
+ if (m_sc.target_sp)
+ {
+ // Be sure to apply and file remappings to our file and line
+ // entries when handing out a line entry
+ FileSpec new_file_spec;
+ if (m_sc.target_sp->GetSourcePathMap().FindFile (m_sc.line_entry.file, new_file_spec))
+ m_sc.line_entry.file = new_file_spec;
+ }
+ }
}
}
else
// If we don't have a module, then we can't have the compile unit,
// function, block, line entry or symbol, so we can safely call
// ResolveSymbolContextForAddress with our symbol context member m_sc.
- TargetSP target_sp (CalculateTarget());
- if (target_sp)
- resolved |= target_sp->GetImages().ResolveSymbolContextForAddress (lookup_addr, resolve_scope, m_sc);
- }
-
- // If the target was requested add that:
- if (!m_sc.target_sp)
- {
- m_sc.target_sp = CalculateTarget();
if (m_sc.target_sp)
- resolved |= eSymbolContextTarget;
+ resolved |= m_sc.target_sp->GetImages().ResolveSymbolContextForAddress (lookup_addr, resolve_scope, m_sc);
}
// Update our internal flags so we remember what we have tried to locate so