** Added gdb.Symbol.domain. Contains the domain of the symbol.
+ ** Added gdb.Architecture.void_type. Returns a gdb.Type representing "void"
+ type for that architecture.
+
* Debugger Adapter Protocol changes
** The "scopes" request will now return a scope holding global
@code{ValueError} exception.
@end defun
+@defun Architecture.void_type ()
+This function returns a void type.
+@end defun
+
@anchor{gdbpy_architecture_registers}
@defun Architecture.registers (@r{[} reggroup @r{]})
Return a @code{gdb.RegisterDescriptorIterator} (@pxref{Registers In
/* Python interface to architecture
- Copyright (C) 2013-2024 Free Software Foundation, Inc.
+ Copyright (C) 2013-2025 Free Software Foundation, Inc.
This file is part of GDB.
return type_to_type_object (type);
}
+/* Implementation of gdb.void_type. */
+static PyObject *
+archpy_void_type (PyObject *self, PyObject *args)
+{
+ struct gdbarch *gdbarch;
+ ARCHPY_REQUIRE_VALID (self, gdbarch);
+
+ return type_to_type_object (builtin_type (gdbarch)->builtin_void);
+}
+
/* __repr__ implementation for gdb.Architecture. */
static PyObject *
"integer_type (size [, signed]) -> type\n\
Return an integer Type corresponding to the given bitsize and signed-ness.\n\
If not specified, the type defaults to signed." },
+ { "void_type", (PyCFunction) archpy_void_type,
+ METH_NOARGS,
+ "void_type () -> type\n\
+Return a void Type." },
{ "registers", (PyCFunction) archpy_registers,
METH_VARARGS | METH_KEYWORDS,
"registers ([ group-name ]) -> Iterator.\n\
"check 'signed' argument can handle non-bool type $bad_type"
}
+gdb_test "python print(arch.void_type())" \
+ "void" \
+ "get void type"
+
# Test for gdb.architecture_names(). First we're going to grab the
# complete list of architecture names using the 'complete' command.
set arch_names []