Skip to content

Commit

Permalink
Identify ARM syscalls in Thumb-2 mode. Tested on IGEP v2 board.
Browse files Browse the repository at this point in the history
Fixes LP:639796.

Signed-off-by: Zach Welch <zwelch@codesourcery.com>
  • Loading branch information
zwelch-mgc authored and ice799 committed Oct 7, 2010
1 parent 1637655 commit 439a7da
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions ChangeLog
@@ -1,3 +1,7 @@
2010-09-30 Zach Welch <zwelch@codesourcery.com>

* Improve ARM syscall_p to handle Thumb-2 syscalls.

2009-07-25 Juan Cespedes <cespedes@debian.org>

* New release 0.5.3
Expand Down
3 changes: 2 additions & 1 deletion sysdeps/linux-gnu/arm/trace.c
Expand Up @@ -49,7 +49,8 @@ syscall_p(Process *proc, int status, int *sysnum) {
int insn = ptrace(PTRACE_PEEKTEXT, proc->pid, pc - 4, 0);
int ip = ptrace(PTRACE_PEEKUSER, proc->pid, off_ip, 0);

if (insn == 0xef000000 || insn == 0x0f000000) {
if (insn == 0xef000000 || insn == 0x0f000000
|| (insn & 0xffff0000) == 0xdf000000) {
/* EABI syscall */
*sysnum = ptrace(PTRACE_PEEKUSER, proc->pid, off_r7, 0);
} else if ((insn & 0xfff00000) == 0xef900000) {
Expand Down

0 comments on commit 439a7da

Please sign in to comment.