In the case of unexpected instruction, syscall_p was returning -1 which
means errors. Unfornatunately, one may get there for valid reasons (bug
triggered by attach_process test case). Better return 0 (not a syscall)

Signed-off-by: Arnaud Patard <[email protected]>
---
 sysdeps/linux-gnu/arm/trace.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sysdeps/linux-gnu/arm/trace.c b/sysdeps/linux-gnu/arm/trace.c
index 10f7cc4..b968d4d 100644
--- a/sysdeps/linux-gnu/arm/trace.c
+++ b/sysdeps/linux-gnu/arm/trace.c
@@ -62,7 +62,7 @@ syscall_p(Process *proc, int status, int *sysnum) {
 			 * PC does not point to the instruction just after the
 			 * "swi" one. */
 			output_line(proc, "unexpected instruction 0x%x at %p", insn, pc - 4);
-			return -1;
+			return 0;
 		}
 		if ((*sysnum & 0xf0000) == 0xf0000) {
 			/* arch-specific syscall */
_______________________________________________
Ltrace-devel mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/ltrace-devel

Reply via email to