Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging
[qemu/ar7.git] / include / hw / semihosting / console.h
blobcfab572c0c384c213b81b5b377bb7872f71899f5
1 /*
2 * Semihosting Console
4 * Copyright (c) 2019 Linaro Ltd
6 * SPDX-License-Identifier: GPL-2.0-or-later
7 */
9 #ifndef SEMIHOST_CONSOLE_H
10 #define SEMIHOST_CONSOLE_H
12 /**
13 * qemu_semihosting_console_outs:
14 * @env: CPUArchState
15 * @s: host address of null terminated guest string
17 * Send a null terminated guest string to the debug console. This may
18 * be the remote gdb session if a softmmu guest is currently being
19 * debugged.
21 * Returns: number of bytes written.
23 int qemu_semihosting_console_outs(CPUArchState *env, target_ulong s);
25 /**
26 * qemu_semihosting_console_outc:
27 * @env: CPUArchState
28 * @s: host address of null terminated guest string
30 * Send single character from guest memory to the debug console. This
31 * may be the remote gdb session if a softmmu guest is currently being
32 * debugged.
34 * Returns: nothing
36 void qemu_semihosting_console_outc(CPUArchState *env, target_ulong c);
38 /**
39 * qemu_semihosting_log_out:
40 * @s: pointer to string
41 * @len: length of string
43 * Send a string to the debug output. Unlike console_out these strings
44 * can't be sent to a remote gdb instance as they don't exist in guest
45 * memory.
47 * Returns: number of bytes written
49 int qemu_semihosting_log_out(const char *s, int len);
51 #endif /* SEMIHOST_CONSOLE_H */