1 /* 2 * Semihosting Console 3 * 4 * Copyright (c) 2019 Linaro Ltd 5 * 6 * SPDX-License-Identifier: GPL-2.0-or-later 7 */ 8 9 #ifndef _SEMIHOST_CONSOLE_H_ 10 #define _SEMIHOST_CONSOLE_H_ 11 12 /** 13 * qemu_semihosting_console_out: 14 * @env: CPUArchState 15 * @s: host address of guest string 16 * @len: length of string or 0 (string is null terminated) 17 * 18 * Send a guest string to the debug console. This may be the remote 19 * gdb session if a softmmu guest is currently being debugged. 20 * 21 * Returns: number of bytes written. 22 */ 23 int qemu_semihosting_console_out(CPUArchState *env, target_ulong s, int len); 24 25 /** 26 * qemu_semihosting_log_out: 27 * @s: pointer to string 28 * @len: length of string 29 * 30 * Send a string to the debug output. Unlike console_out these strings 31 * can't be sent to a remote gdb instance as they don't exist in guest 32 * memory. 33 * 34 * Returns: number of bytes written 35 */ 36 int qemu_semihosting_log_out(const char *s, int len); 37 38 #endif /* _SEMIHOST_CONSOLE_H_ */ 39