Received: from eggs.gnu.org ([2001:4830:134:3::10]:40404) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XqoTE-0000Dl-0V for qemu-devel@nongnu.org; Tue, 18 Nov 2014 14:29:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XqoT7-0000u2-U3 for qemu-devel@nongnu.org; Tue, 18 Nov 2014 14:29:47 -0500 Received: from [109.99.239.84] (port=37866 helo=ilg-mbp.local) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XqoT7-0000tp-MF for qemu-devel@nongnu.org; Tue, 18 Nov 2014 14:29:41 -0500 From: Liviu Ionescu Date: Tue, 18 Nov 2014 21:29:22 +0200 Message-Id: <1416338963-97608-1-git-send-email-ilg@livius.net> Subject: [Qemu-devel] [PATCH] pass ARM semihosting exit code back to system List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, ilg@livius.net In order to run unit tests under semihosting, it is necessary to pass the application exit code back to the system. ARM defines only the code to be used for non-error application exit (ADP_Stopped_ApplicationExit), all other codes should return non-zero exit codes. This patch checks if the application code passed via TARGET_SYS_EXIT is ADP_Stopped_ApplicationExit, and return 0, otherwise return 1. Liviu Ionescu (1): pass semihosting exit code back to system target-arm/arm-semi.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) -- 1.9.3 (Apple Git-50)