diff options
author | Liviu Ionescu <ilg@livius.net> | 2014-12-11 12:07:48 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2014-12-11 12:07:48 +0000 |
commit | a38bb0792ca8b4082d81884a6cb25fa0d334b4a6 (patch) | |
tree | 4f3e97c0503eff2d0dee171572d657b2da26b5eb /include | |
parent | 1ecc3a2df168034b8ab33ff5ba6434ce3593dbb5 (diff) | |
download | hqemu-a38bb0792ca8b4082d81884a6cb25fa0d334b4a6.zip hqemu-a38bb0792ca8b4082d81884a6cb25fa0d334b4a6.tar.gz |
Add the "-semihosting-config" option.
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.
Signed-off-by: Liviu Ionescu <ilg@livius.net>
Message-id: 1416341957-9796-1-git-send-email-ilg@livius.net
[PMM: moved declaration and definition of semihosting_target to
gdbstub.h and gdbstub.c to fix build failure on linux-user]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/exec/gdbstub.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/exec/gdbstub.h b/include/exec/gdbstub.h index a608a26..c633248 100644 --- a/include/exec/gdbstub.h +++ b/include/exec/gdbstub.h @@ -95,4 +95,10 @@ extern bool gdb_has_xml; /* in gdbstub-xml.c, generated by scripts/feature_to_c.sh */ extern const char *const xml_builtin[][2]; +/* Command line option defining whether semihosting should go via gdb or not */ +extern int semihosting_target; +#define SEMIHOSTING_TARGET_AUTO 0 +#define SEMIHOSTING_TARGET_NATIVE 1 +#define SEMIHOSTING_TARGET_GDB 2 + #endif |