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/fbsd-tdep.c | |
parent | 6b62451ad08056f0ba02e192ec34ef67c4294ef4 (diff) | |
download | gdb-6b09f1342cf2d8e2b13a0d634acc3bcf2852a73b.zip gdb-6b09f1342cf2d8e2b13a0d634acc3bcf2852a73b.tar.gz 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/fbsd-tdep.c')
-rw-r--r-- | gdb/fbsd-tdep.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/fbsd-tdep.c b/gdb/fbsd-tdep.c index d166d78..4ac3369 100644 --- a/gdb/fbsd-tdep.c +++ b/gdb/fbsd-tdep.c @@ -650,10 +650,10 @@ find_signalled_thread (struct thread_info *info, void *data) the data is prefixed with a 32-bit integer size to match the format used in FreeBSD NT_PROCSTAT_* notes. */ -static gdb::optional<gdb::byte_vector> +static std::optional<gdb::byte_vector> fbsd_make_note_desc (enum target_object object, uint32_t structsize) { - gdb::optional<gdb::byte_vector> buf = + std::optional<gdb::byte_vector> buf = target_read_alloc (current_inferior ()->top_target (), object, NULL); if (!buf || buf->empty ()) return {}; @@ -735,7 +735,7 @@ fbsd_make_corefile_notes (struct gdbarch *gdbarch, bfd *obfd, int *note_size) /* Auxiliary vector. */ uint32_t structsize = gdbarch_ptr_bit (gdbarch) / 4; /* Elf_Auxinfo */ - gdb::optional<gdb::byte_vector> note_desc = + std::optional<gdb::byte_vector> note_desc = fbsd_make_note_desc (TARGET_OBJECT_AUXV, structsize); if (note_desc && !note_desc->empty ()) { @@ -2340,7 +2340,7 @@ fbsd_vdso_range (struct gdbarch *gdbarch, struct mem_range *range) else { /* Fetch the list of address space entries from the running target. */ - gdb::optional<gdb::byte_vector> buf = + std::optional<gdb::byte_vector> buf = target_read_alloc (current_inferior ()->top_target (), TARGET_OBJECT_FREEBSD_VMMAP, nullptr); if (!buf || buf->empty ()) |