mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
semihosting: Split out semihost_sys_lseek
Split out the non-ARM specific portions of SYS_SEEK to a reusable function. This handles all GuestFD. Isolate the curious ARM-specific return value processing to a new callback, common_semi_seek_cb. Expand the internal type of the offset to int64_t, and provide the whence argument, which will be required by m68k and nios2 semihosting. Note that gdb_do_syscall %x reads target_ulong, not int. Reviewed-by: Luc Michel <lmichel@kalray.eu> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
40f1219a8b
commit
9a89470449
4 changed files with 102 additions and 38 deletions
|
@ -39,4 +39,7 @@ void semihost_sys_write(CPUState *cs, gdb_syscall_complete_cb complete,
|
|||
void semihost_sys_write_gf(CPUState *cs, gdb_syscall_complete_cb complete,
|
||||
GuestFD *gf, target_ulong buf, target_ulong len);
|
||||
|
||||
void semihost_sys_lseek(CPUState *cs, gdb_syscall_complete_cb complete,
|
||||
int fd, int64_t off, int gdb_whence);
|
||||
|
||||
#endif /* SEMIHOSTING_SYSCALLS_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue