Received: from eggs.gnu.org ([2001:4830:134:3::10]:40460) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XqoTM-0000KV-Vf for qemu-devel@nongnu.org; Tue, 18 Nov 2014 14:30:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XqoT7-0000tx-TY for qemu-devel@nongnu.org; Tue, 18 Nov 2014 14:29:56 -0500 Received: from [109.99.239.84] (port=47658 helo=ilg-mbp.local) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XqoT7-0000to-MC for qemu-devel@nongnu.org; Tue, 18 Nov 2014 14:29:41 -0500 From: Liviu Ionescu Date: Tue, 18 Nov 2014 21:00:09 +0200 Message-Id: <1416337210-90793-1-git-send-email-ilg@livius.net> Subject: [Qemu-devel] [PATCH] add -semihosting-config option 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 The usual semihosting behaviour is to process the system calls locally and return; unfortuantelly the initial implementation dinamically changed the target to GDB during debug sessions, which, for the usual arm-none-eabi-gdb, is not implemented. The result was that during debug sessions the semihosting calls were discarded. This patch adds a configuration variable and an option to set it on the command line: -semihosting-config [enable=on|off,]target=native|gdb|auto This option enables semihosting and defines where the semihosting calls will be addressed, to QEMU ('native') or to GDB ('gdb'). The default is auto, which means 'gdb' during debug sessions and 'native' otherwise. Liviu Ionescu (1): add semihosting-config option gdbstub.c | 12 ++++++++++++ include/sysemu/sysemu.h | 6 ++++++ qemu-options.hx | 12 +++++++++++- vl.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 78 insertions(+), 1 deletion(-) -- 1.9.3 (Apple Git-50)