forked from OSchip/llvm-project
Before returning a pc value for a stack frame,
run it through the ABI's FixCodeAddress method. <rdar://problem/29711506> llvm-svn: 295025
This commit is contained in:
parent
4c82b4f6fa
commit
be227955e2
|
@ -2015,7 +2015,18 @@ bool RegisterContextLLDB::GetStartPC(addr_t &start_pc) {
|
|||
return false;
|
||||
|
||||
if (!m_start_pc.IsValid()) {
|
||||
return ReadPC(start_pc);
|
||||
bool read_successfully = ReadPC (start_pc);
|
||||
if (read_successfully)
|
||||
{
|
||||
ProcessSP process_sp (m_thread.GetProcess());
|
||||
if (process_sp)
|
||||
{
|
||||
ABI *abi = process_sp->GetABI().get();
|
||||
if (abi)
|
||||
start_pc = abi->FixCodeAddress(start_pc);
|
||||
}
|
||||
}
|
||||
return read_successfully;
|
||||
}
|
||||
start_pc = m_start_pc.GetLoadAddress(CalculateTarget().get());
|
||||
return true;
|
||||
|
@ -2044,9 +2055,16 @@ bool RegisterContextLLDB::ReadPC(addr_t &pc) {
|
|||
if (m_all_registers_available == false && above_trap_handler == false &&
|
||||
(pc == 0 || pc == 1)) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
|
||||
ProcessSP process_sp (m_thread.GetProcess());
|
||||
if (process_sp)
|
||||
{
|
||||
ABI *abi = process_sp->GetABI().get();
|
||||
if (abi)
|
||||
pc = abi->FixCodeAddress(pc);
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue