diff options
author | Lancelot Six <lancelot.six@amd.com> | 2023-10-13 09:27:48 +0000 |
---|---|---|
committer | Lancelot Six <lancelot.six@amd.com> | 2023-11-21 11:52:35 +0000 |
commit | 6b09f1342cf2d8e2b13a0d634acc3bcf2852a73b (patch) | |
tree | 07259601270022a6cbeb89826560262f015e1589 /gdb/windows-nat.c | |
parent | 6b62451ad08056f0ba02e192ec34ef67c4294ef4 (diff) | |
download | fsf-binutils-gdb-6b09f1342cf2d8e2b13a0d634acc3bcf2852a73b.zip fsf-binutils-gdb-6b09f1342cf2d8e2b13a0d634acc3bcf2852a73b.tar.gz fsf-binutils-gdb-6b09f1342cf2d8e2b13a0d634acc3bcf2852a73b.tar.bz2 |
gdb: Replace gdb::optional with std::optional
Since GDB now requires C++17, we don't need the internally maintained
gdb::optional implementation. This patch does the following replacing:
- gdb::optional -> std::optional
- gdb::in_place -> std::in_place
- #include "gdbsupport/gdb_optional.h" -> #include <optional>
This change has mostly been done automatically. One exception is
gdbsupport/thread-pool.* which did not use the gdb:: prefix as it
already lives in the gdb namespace.
Change-Id: I19a92fa03e89637bab136c72e34fd351524f65e9
Approved-By: Tom Tromey <tom@tromey.com>
Approved-By: Pedro Alves <pedro@palves.net>
Diffstat (limited to 'gdb/windows-nat.c')
-rw-r--r-- | gdb/windows-nat.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c index 205bf01..b344034 100644 --- a/gdb/windows-nat.c +++ b/gdb/windows-nat.c @@ -1335,7 +1335,7 @@ windows_nat_target::windows_continue (DWORD continue_status, int id, th->suspend (); } - gdb::optional<unsigned> err; + std::optional<unsigned> err; do_synchronously ([&] () { if (!continue_last_debug_event (continue_status, debug_events)) @@ -1561,7 +1561,7 @@ windows_nat_target::get_windows_debug_event /* If there is a relevant pending stop, report it now. See the comment by the definition of "pending_stops" for details on why this is needed. */ - gdb::optional<pending_stop> stop + std::optional<pending_stop> stop = windows_process.fetch_pending_stop (debug_events); if (stop.has_value ()) { @@ -2024,7 +2024,7 @@ windows_nat_target::attach (const char *args, int from_tty) windows_init_thread_list (); windows_process.saw_create = 0; - gdb::optional<unsigned> err; + std::optional<unsigned> err; do_synchronously ([&] () { BOOL ok = DebugActiveProcess (pid); @@ -2074,7 +2074,7 @@ windows_nat_target::detach (inferior *inf, int from_tty) { windows_continue (DBG_CONTINUE, -1, 0, true); - gdb::optional<unsigned> err; + std::optional<unsigned> err; do_synchronously ([&] () { if (!DebugActiveProcessStop (windows_process.current_event.dwProcessId)) @@ -2533,7 +2533,7 @@ windows_nat_target::create_inferior (const char *exec_file, #endif /* !__CYGWIN__ */ const char *allargs = origallargs.c_str (); PROCESS_INFORMATION pi; - gdb::optional<unsigned> ret; + std::optional<unsigned> ret; DWORD flags = 0; const std::string &inferior_tty = current_inferior ()->tty (); |