* hostio.c: Don't include errno.h.
(errno_to_fileio_errno): Move to hostio-errno. * hostio.c: (hostio_error): Remove the error parameter. Defer the error number outputting to the target->hostio_last_error callback. (hostio_packet_error): Use FILEIO_EINVAL directly. (handle_open, handle_pread, hostio_error, handle_unlink): Update calls to hostio_error. * hostio-errno.c: New. * server.h (hostio_last_error_from_errno): Declare. * target.h (target_ops): Add hostio_last_error member. * linux-low.c (linux_target_op): Register hostio_last_error_from_errno as hostio_last_error handler. * spu-low.c (spu_target_ops): Likewise. * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error) (wince_hostio_last_error): New functions. (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error as hostio_last_error handler. (win32_target_ops) [!_WIN32_WCE]: Register hostio_last_error_from_errno as hostio_last_error handler. * Makefile.in (SFILES): Add hostio.c and hostio-errno.c. (hostio-errno.o): New rule. * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs. * configure.srv (srv_hostio_err_objs): New variable. Default to hostio-errno.o. (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "". * configure: Regenerate.
This commit is contained in:
parent
a279d1ff82
commit
59a016f09f
12 changed files with 216 additions and 66 deletions
|
@ -6,6 +6,8 @@
|
|||
# srv_regobj The register protocol appropriate for this target.
|
||||
# srv_tgtobj Any other target-specific modules appropriate
|
||||
# for this target.
|
||||
# srv_hostio_err The object implementing the hostio_last_error
|
||||
# target method.
|
||||
# srv_xmltarget The XML source file to use for target.xml, if any.
|
||||
# srv_xmlfiles Any other XML files which should be available for
|
||||
# gdbserver in this configuration.
|
||||
|
@ -18,6 +20,9 @@
|
|||
# srv_linux_usrregs Set to "yes" if we can get at registers via
|
||||
# PTRACE_PEEKUSR / PTRACE_POKEUSR.
|
||||
|
||||
# Default hostio_last_error implementation
|
||||
srv_hostio_err_objs="hostio-errno.o"
|
||||
|
||||
# Input is taken from the "${target}" variable.
|
||||
|
||||
case "${target}" in
|
||||
|
@ -36,6 +41,8 @@ case "${target}" in
|
|||
arm*-*-mingw32ce*) srv_regobj=reg-arm.o
|
||||
srv_tgtobj="win32-low.o win32-arm-low.o"
|
||||
srv_tgtobj="${srv_tgtobj} wincecompat.o"
|
||||
# hostio_last_error implementation is in win32-low.c
|
||||
srv_hostio_err_objs=""
|
||||
srv_mingw=yes
|
||||
srv_mingwce=yes
|
||||
;;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue