gdb: Guile Types Module
23.3.5.2 Guile Types Module
...........................
This module provides a collection of utilities for working with
'<gdb:type>' objects.
Usage:
(use-modules (gdb types))
-- Scheme Procedure: get-basic-type type
Return TYPE with const and volatile qualifiers stripped, and with
typedefs and C++ references converted to the underlying type.
C++ example:
typedef const int const_int;
const_int foo (3);
const_int& foo_ref (foo);
int main () { return 0; }
Then in gdb:
(gdb) start
(gdb) guile (use-modules (gdb) (gdb types))
(gdb) guile (define foo-ref (parse-and-eval "foo_ref"))
(gdb) guile (get-basic-type (value-type foo-ref))
int
-- Scheme Procedure: type-has-field-deep? type field
Return '#t' if TYPE, assumed to be a type with fields (e.g., a
structure or union), has field FIELD. Otherwise return '#f'. This
searches baseclasses, whereas 'type-has-field?' does not.
-- Scheme Procedure: make-enum-hashtable enum-type
Return a Guile hash table produced from ENUM-TYPE. Elements in the
hash table are referenced with 'hashq-ref'.