Next: , Previous: Guile Configuration, Up: Guile API


23.3.3.3 GDB Scheme Data Types

gdb uses Guile's smob (small object) data type for all gdb objects (see Defining New Types (Smobs)). The smobs that gdb provides are called gsmobs.

— Scheme Procedure: gsmob-kind gsmob

Return the kind of the gsmob, e.g., <gdb:breakpoint>, as a symbol.

Every gsmob provides a common set of functions for extending them in simple ways. Each gsmob has a list of properties, initially empty. These properties are akin to Guile's object properties, but are stored with the gsmob (see Object Properties). Property names can be any eq?-able value, but it is recommended that they be symbols.

— Scheme Procedure: set-gsmob-property! gsmob property-name value

Set the value of property property-name to value value. The result is unspecified.

— Scheme Procedure: gsmob-property gsmob property-name

Return the value of property property-name. If the property isn't present then #f is returned.

— Scheme Procedure: gsmob-has-property? gsmob property-name

Return #t if gsmob has property property-name. Otherwise return #f.

— Scheme Procedure: gsmob-properties gsmob

Return an unsorted list of names of properties.

gdb defines the following Scheme smobs:

<gdb:arch>
See Architectures In Guile.
<gdb:block>
See Blocks In Guile.
<gdb:block-symbols-iterator>
See Blocks In Guile.
<gdb:breakpoint>
See Breakpoints In Guile.
<gdb:exception>
See Guile Exception Handling.
<gdb:frame>
See Frames In Guile.
<gdb:iterator>
See Iterators In Guile.
<gdb:lazy-string>
See Lazy Strings In Guile.
<gdb:objfile>
See Objfiles In Guile.
<gdb:pretty-printer>
See Guile Pretty Printing API.
<gdb:pretty-printer-worker>
See Guile Pretty Printing API.
<gdb:symbol>
See Symbols In Guile.
<gdb:symtab>
See Symbol Tables In Guile.
<gdb:sal>
See Symbol Tables In Guile.
<gdb:type>
See Types In Guile.
<gdb:field>
See Types In Guile.
<gdb:value>
See Values From Inferior In Guile.

The following gsmobs are managed internally so that the Scheme function eq? may be applied to them.

<gdb:arch>
<gdb:block>
<gdb:breakpoint>
<gdb:frame>
<gdb:objfile>
<gdb:symbol>
<gdb:symtab>
<gdb:type>