From 7361a433d09358a339e4ea81d5da3f7dd7f1b1ca Mon Sep 17 00:00:00 2001 From: Thomas Jarosch Date: Mon, 12 Jan 2015 19:26:16 +0100 Subject: ARM unwinder for thumb: Fix broken SUB opcode Detected while looking through the code. Patch submitted upstream. Change-Id: I7ebe7b5f5947cf3df1b054d545dba92829f21b99 --- lib/unwarminder/unwarm_thumb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/unwarminder/unwarm_thumb.c b/lib/unwarminder/unwarm_thumb.c index 027d951f33..b71d9732b1 100644 --- a/lib/unwarminder/unwarm_thumb.c +++ b/lib/unwarminder/unwarm_thumb.c @@ -244,7 +244,7 @@ UnwResult UnwStartThumb(UnwState * const state) case 3: /* SUB */ UnwPrintd5("SUB r%d, #0x%d\t; r%d %s", rd, offset8, rd, M_Origin2Str(state->regData[rd].o)); - state->regData[rd].v += offset8; + state->regData[rd].v -= offset8; state->regData[rd].o |= REG_VAL_ARITHMETIC; break; } -- cgit v1.2.3