aboutsummaryrefslogtreecommitdiff
path: root/gdbserver/win32-low.cc
diff options
context:
space:
mode:
authorTankut Baris Aktemur <tankut.baris.aktemur@intel.com>2020-02-17 16:11:56 +0100
committerTankut Baris Aktemur <tankut.baris.aktemur@intel.com>2020-02-20 17:35:09 +0100
commitea06bbaaaa975331a42f2054551e78f588020462 (patch)
tree91b39b2e32a82b8ad8ca70195c48a6a9ad27787f /gdbserver/win32-low.cc
parent6e3fd7e948d158a04c0af7130e6648ad75aaba66 (diff)
downloadgdb-ea06bbaaaa975331a42f2054551e78f588020462.zip
gdb-ea06bbaaaa975331a42f2054551e78f588020462.tar.gz
gdb-ea06bbaaaa975331a42f2054551e78f588020462.tar.bz2
gdbserver: turn target op 'hostio_last_error' into a method
gdbserver/ChangeLog: 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> Turn process_stratum_target's hostio_last_error op into a method of process_target. * target.h (struct process_stratum_target): Remove the target op. (class process_target): Add the target op. * target.cc: Add "hostio.h" to includes. (process_target::hostio_last_error): Define. Update the derived classes and callers below. * hostio.cc (hostio_error): Update. * linux-low.cc: Remove "hostio.h" from includes. (linux_target_ops): Update. * lynx-low.cc (lynx_target_ops): Update. * nto-low.cc (nto_target_ops): Update. * win32-low.h (class win32_process_target): Update. * win32-low.cc (win32_target_ops): Update. (wince_hostio_last_error): Turn into ... (win32_process_target::hostio_last_error): ... this.
Diffstat (limited to 'gdbserver/win32-low.cc')
-rw-r--r--gdbserver/win32-low.cc9
1 files changed, 2 insertions, 7 deletions
diff --git a/gdbserver/win32-low.cc b/gdbserver/win32-low.cc
index 84223e1..727bc9c 100644
--- a/gdbserver/win32-low.cc
+++ b/gdbserver/win32-low.cc
@@ -1784,8 +1784,8 @@ win32_error_to_fileio_error (DWORD err)
return FILEIO_EUNKNOWN;
}
-static void
-wince_hostio_last_error (char *buf)
+void
+win32_process_target::hostio_last_error (char *buf)
{
DWORD winerr = GetLastError ();
int fileio_err = win32_error_to_fileio_error (winerr);
@@ -1844,11 +1844,6 @@ win32_sw_breakpoint_from_kind (int kind, int *size)
static win32_process_target the_win32_target;
static process_stratum_target win32_target_ops = {
-#ifdef _WIN32_WCE
- wince_hostio_last_error,
-#else
- hostio_last_error_from_errno,
-#endif
NULL, /* qxfer_osdata */
win32_xfer_siginfo,
NULL, /* supports_non_stop */