Author: davide
Date: Fri Nov 17 16:54:31 2017
New Revision: 318580
URL: http://llvm.org/viewvc/llvm-project?rev=318580&view=rev
Log:
[ABI] Remove dead code that was copy-pasted all around. NFCI.
Modified:
lldb/trunk/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.cpp
lldb/trunk/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.cpp
Modified: lldb/trunk/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.cpp
URL:
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.cpp?rev=318580&r1=318579&r2=318580&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.cpp (original)
+++ lldb/trunk/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.cpp Fri Nov 17 16:54:31
2017
@@ -291,47 +291,6 @@ bool ABISysV_ppc::PrepareTrivialCall(Thr
RegisterValue reg_value;
-#if 0
- // This code adds an extra frame so that we don't lose the function that
we came from
- // by pushing the PC and the FP and then writing the current FP to point
to the FP value
- // we just pushed. It is disabled for now until the stack backtracing code
can be debugged.
-
- // Save current PC
- const RegisterInfo *fp_reg_info = reg_ctx->GetRegisterInfo
(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_FP);
- if (reg_ctx->ReadRegister(pc_reg_info, reg_value))
- {
- if (log)
- log->Printf("Pushing the current PC onto the stack: 0x%" PRIx64 ":
0x%" PRIx64, (uint64_t)sp, reg_value.GetAsUInt64());
-
- if (!process_sp->WritePointerToMemory(sp, reg_value.GetAsUInt64(),
error))
- return false;
-
- sp -= 8;
-
- // Save current FP
- if (reg_ctx->ReadRegister(fp_reg_info, reg_value))
- {
- if (log)
- log->Printf("Pushing the current FP onto the stack: 0x%"
PRIx64 ": 0x%" PRIx64, (uint64_t)sp, reg_value.GetAsUInt64());
-
- if (!process_sp->WritePointerToMemory(sp, reg_value.GetAsUInt64(),
error))
- return false;
- }
- // Setup FP backchain
- reg_value.SetUInt64 (sp);
-
- if (log)
- log->Printf("Writing FP: 0x%" PRIx64 " (for FP backchain)",
reg_value.GetAsUInt64());
-
- if (!reg_ctx->WriteRegister(fp_reg_info, reg_value))
- {
- return false;
- }
-
- sp -= 8;
- }
-#endif
-
if (log)
log->Printf("Pushing the return address onto the stack: 0x%" PRIx64
": 0x%" PRIx64,
Modified: lldb/trunk/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.cpp
URL:
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.cpp?rev=318580&r1=318579&r2=318580&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.cpp (original)
+++ lldb/trunk/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.cpp Fri Nov 17
16:54:31 2017
@@ -291,47 +291,6 @@ bool ABISysV_ppc64::PrepareTrivialCall(T
RegisterValue reg_value;
-#if 0
- // This code adds an extra frame so that we don't lose the function that
we came from
- // by pushing the PC and the FP and then writing the current FP to point
to the FP value
- // we just pushed. It is disabled for now until the stack backtracing code
can be debugged.
-
- // Save current PC
- const RegisterInfo *fp_reg_info = reg_ctx->GetRegisterInfo
(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_FP);
- if (reg_ctx->ReadRegister(pc_reg_info, reg_value))
- {
- if (log)
- log->Printf("Pushing the current PC onto the stack: 0x%" PRIx64 ":
0x%" PRIx64, (uint64_t)sp, reg_value.GetAsUInt64());
-
- if (!process_sp->WritePointerToMemory(sp, reg_value.GetAsUInt64(),
error))
- return false;
-
- sp -= 8;
-
- // Save current FP
- if (reg_ctx->ReadRegister(fp_reg_info, reg_value))
- {
- if (log)
- log->Printf("Pushing the current FP onto the stack: 0x%"
PRIx64 ": 0x%" PRIx64, (uint64_t)sp, reg_value.GetAsUInt64());
-
- if (!process_sp->WritePointerToMemory(sp, reg_value.GetAsUInt64(),
error))
- return false;
- }
- // Setup FP backchain
- reg_value.SetUInt64 (sp);
-
- if (log)
- log->Printf("Writing FP: 0x%" PRIx64 " (for FP backchain)",
reg_value.GetAsUInt64());
-
- if (!reg_ctx->WriteRegister(fp_reg_info, reg_value))
- {
- return false;
- }
-
- sp -= 8;
- }
-#endif
-
if (log)
log->Printf("Pushing the return address onto the stack: 0x%" PRIx64
": 0x%" PRIx64,
_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits