aboutsummaryrefslogtreecommitdiff
path: root/gdb/tui
diff options
context:
space:
mode:
authorLancelot Six <lancelot.six@amd.com>2023-10-13 09:27:48 +0000
committerLancelot Six <lancelot.six@amd.com>2023-11-21 11:52:35 +0000
commit6b09f1342cf2d8e2b13a0d634acc3bcf2852a73b (patch)
tree07259601270022a6cbeb89826560262f015e1589 /gdb/tui
parent6b62451ad08056f0ba02e192ec34ef67c4294ef4 (diff)
downloadfsf-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/tui')
-rw-r--r--gdb/tui/tui-disasm.c2
-rw-r--r--gdb/tui/tui-layout.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/gdb/tui/tui-disasm.c b/gdb/tui/tui-disasm.c
index ffcb95b..b5d5a4c 100644
--- a/gdb/tui/tui-disasm.c
+++ b/gdb/tui/tui-disasm.c
@@ -234,7 +234,7 @@ tui_find_disassembly_address (struct gdbarch *gdbarch, CORE_ADDR pc, int from)
promising starting point then we record it in this structure. If
the next address we try is not a suitable starting point then we
will fall back to the address held here. */
- gdb::optional<CORE_ADDR> possible_new_low;
+ std::optional<CORE_ADDR> possible_new_low;
/* The previous value of NEW_LOW so we know if the new value is
different or not. */
diff --git a/gdb/tui/tui-layout.c b/gdb/tui/tui-layout.c
index 159445d..b932649 100644
--- a/gdb/tui/tui-layout.c
+++ b/gdb/tui/tui-layout.c
@@ -819,7 +819,7 @@ tui_layout_split::apply (int x_, int y_, int width_, int height_,
};
/* This is given a value only if we fix the size of the cmd window. */
- gdb::optional<old_size_info> old_cmd_info;
+ std::optional<old_size_info> old_cmd_info;
std::vector<size_info> info (m_splits.size ());