[Ltrace-devel] Cleanup patch for ltrace and ppc64el
Thierry@vnet
thierry at linux.vnet.ibm.com
Sun Feb 23 17:28:28 UTC 2014
Hello after reading the code in order to prepare the patch for dev.
tree, I found the following line not mandatory and here is a proposal
patch which pass the current internal testing.
diff --git a/ltrace-0.7.3-v2b/sysdeps/linux-gnu/ppc/trace.c
b/ltrace-0.7.3/sysdep
index baf12ad..df53578 100644
--- a/ltrace-0.7.3-v2b/sysdeps/linux-gnu/ppc/trace.c
+++ b/ltrace-0.7.3/sysdeps/linux-gnu/ppc/trace.c
@@ -126,9 +126,7 @@ arch_atomic_singlestep(struct Process *proc, struct
breakpoin
int insn_count;
arch_addr_t addr = ip;
for (insn_count = 0; ; ++insn_count) {
-#if (!defined(__LITTLE_ENDIAN__)) || (_CALL_ELF == 2)
addr += 4;
-#endif
unsigned long l = ptrace(PTRACE_PEEKTEXT, proc->pid,
addr, 0);
if (l == (unsigned long)-1 && errno)
return -1;
{ltrace-0.7.3-v2b => ltrace-0.7.3}/sysdeps/linux-gnu/ppc/plt.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/ltrace-0.7.3-v2b/sysdeps/linux-gnu/ppc/plt.c
b/ltrace-0.7.3/sysdeps/
index 8e03283..137cb27 100644
--- a/ltrace-0.7.3-v2b/sysdeps/linux-gnu/ppc/plt.c
+++ b/ltrace-0.7.3/sysdeps/linux-gnu/ppc/plt.c
@@ -257,11 +257,7 @@ arch_plt_sym_val(struct ltelf *lte, size_t ndx,
GElf_Rela *r
* that case we put brakpoints to PLT entries the same
* as the PPC32 secure PLT case does. */
assert(lte->arch.plt_stub_vma != 0);
-#if _CALL_ELF != 2
return lte->arch.plt_stub_vma + PPC64_PLT_STUB_SIZE * ndx;
-#else
- return lte->arch.plt_stub_vma - 4 + PPC64_PLT_STUB_SIZE
* ndx;
-#endif
}
}
More next week
Thanks
Thierry
--
Thierry @ linux.vnet.ibm.com
More information about the Ltrace-devel
mailing list