Debugging with GDB: Guile Types Module |
---|
Previous: Guile Printing Module, Up: Guile Modules [Contents][Index]
This module provides a collection of utilities for working with
<gdb:type>
objects.
Usage:
(use-modules (gdb types))
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
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.
Return a Guile hash table produced from enum-type.
Elements in the hash table are referenced with hashq-ref
.