Projects
home:Eustace:branches:Eulaceura:Factory
ltrace
_service:obs_scm:bugfix-0001-ltrace-byteswap-in...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:obs_scm:bugfix-0001-ltrace-byteswap-instruction-in-arm-be8-mode.patch of Package ltrace
diff --git a/sysdeps/linux-gnu/arm/trace.c b/sysdeps/linux-gnu/arm/trace.c index f974d1f..8526bf1 100644 --- a/sysdeps/linux-gnu/arm/trace.c +++ b/sysdeps/linux-gnu/arm/trace.c @@ -77,6 +77,15 @@ syscall_p(struct process *proc, int status, int *sysnum) unsigned insn = ptrace(PTRACE_PEEKTEXT, proc->pid, (void *)pc, 0); +#if defined(__ARMEB__) && defined(__ARM_ARCH_7A__) + /* We running big endian arm on ARMv7: instructions are + * in little endian form so we need to byteswap it. Note + * on older ARM like V5 Xscale code is in big endian form + * byte swap is not needed in this case. I.e be8 vs be32. + */ + insn = __builtin_bswap32(insn); +#endif /* __ARMEB__ && __ARM_ARCH_7A__ */ + if (insn == 0xef000000 || insn == 0x0f000000 || (insn & 0xffff0000) == 0xdf000000) { /* EABI syscall */
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2