diff options
Diffstat (limited to 'gdb/python/py-disasm.c')
-rw-r--r-- | gdb/python/py-disasm.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/gdb/python/py-disasm.c b/gdb/python/py-disasm.c index 6f0fed1..7a13b81 100644 --- a/gdb/python/py-disasm.c +++ b/gdb/python/py-disasm.c @@ -176,7 +176,7 @@ struct gdbpy_disassembler : public gdb_disassemble_info /* Return a reference to an optional that contains the address at which a memory error occurred. The optional will only have a value if a memory error actually occurred. */ - const gdb::optional<CORE_ADDR> &memory_error_address () const + const std::optional<CORE_ADDR> &memory_error_address () const { return m_memory_error_address; } /* Return the content of the disassembler as a string. The contents are @@ -221,7 +221,7 @@ private: /* When the user indicates that a memory error has occurred then the address of the memory error is stored in here. */ - gdb::optional<CORE_ADDR> m_memory_error_address; + std::optional<CORE_ADDR> m_memory_error_address; /* When the user calls the builtin_disassemble function, if they pass a memory source object then a pointer to the object is placed in here, @@ -245,7 +245,7 @@ private: /* Store a single exception. This is used to pass Python exceptions back from ::memory_read to disasmpy_builtin_disassemble. */ - gdb::optional<gdbpy_err_fetch> m_stored_exception; + std::optional<gdbpy_err_fetch> m_stored_exception; }; /* Return true if OBJ is still valid, otherwise, return false. A valid OBJ @@ -1215,7 +1215,7 @@ private: /* See python-internal.h. */ -gdb::optional<int> +std::optional<int> gdbpy_print_insn (struct gdbarch *gdbarch, CORE_ADDR memaddr, disassemble_info *info) { @@ -1294,7 +1294,7 @@ gdbpy_print_insn (struct gdbarch *gdbarch, CORE_ADDR memaddr, addr = disasm_info->address; info->memory_error_func (-1, addr, info); - return gdb::optional<int> (-1); + return std::optional<int> (-1); } else if (PyErr_ExceptionMatches (gdbpy_gdberror_exc)) { @@ -1302,12 +1302,12 @@ gdbpy_print_insn (struct gdbarch *gdbarch, CORE_ADDR memaddr, gdb::unique_xmalloc_ptr<char> msg = err.to_string (); info->fprintf_func (info->stream, "%s", msg.get ()); - return gdb::optional<int> (-1); + return std::optional<int> (-1); } else { gdbpy_print_stack (); - return gdb::optional<int> (-1); + return std::optional<int> (-1); } } @@ -1326,7 +1326,7 @@ gdbpy_print_insn (struct gdbarch *gdbarch, CORE_ADDR memaddr, PyErr_SetString (PyExc_TypeError, _("Result is not a DisassemblerResult.")); gdbpy_print_stack (); - return gdb::optional<int> (-1); + return std::optional<int> (-1); } /* The result from the Python disassembler has the correct type. Convert @@ -1345,7 +1345,7 @@ gdbpy_print_insn (struct gdbarch *gdbarch, CORE_ADDR memaddr, (PyExc_ValueError, _("Invalid length attribute: length must be greater than 0.")); gdbpy_print_stack (); - return gdb::optional<int> (-1); + return std::optional<int> (-1); } if (length > max_insn_length) { @@ -1354,7 +1354,7 @@ gdbpy_print_insn (struct gdbarch *gdbarch, CORE_ADDR memaddr, _("Invalid length attribute: length %d greater than architecture maximum of %d"), length, max_insn_length); gdbpy_print_stack (); - return gdb::optional<int> (-1); + return std::optional<int> (-1); } /* It is impossible to create a DisassemblerResult object with an empty @@ -1390,7 +1390,7 @@ gdbpy_print_insn (struct gdbarch *gdbarch, CORE_ADDR memaddr, } } - return gdb::optional<int> (length); + return std::optional<int> (length); } /* The tp_dealloc callback for the DisassemblerResult type. Takes care of |