Next: , Previous: guile-tools run-all-tests, Up: Miscellaneous Tools


13.37 guile-tools scan-api

Usage: scan-api [-t NM-TYPES] GUILE SOFILE [GROUPINGS ...]

Invoke GUILE, an executable guile interpreter, and use nm(1) on SOFILE, a
shared-object library, to determine available interface elements, and
display them to stdout as an alist:

  ((meta ...) (interface ...))

The meta fields are `GUILE_LOAD_PATH', `LTDL_LIBRARY_PATH', `guile'
`libguileinterface', `sofile' and `groups'.  The interface elements are in
turn sub-alists w/ keys `groups' and `scan-data'.  Interface elements
initially belong in one of two groups `Scheme' or `C' (but not both --
signal error if that happens).  Elements whose names contain " " (space)
are omitted.

The default nm types are "B-TV-Z", which selects those symbols that have
code "B" through "T" or "V" through "Z".  You can use "--types SPEC" to
select another range.  SPEC is a normal regular expression character class,
without the surrounding square braces.  For example, "-t BU" would select
both symbols in the BSS section, and undefined symbols.

Optional GROUPINGS ... specify files each containing a single "grouping
definition" alist with each entry of the form:

  (NAME (description "DESCRIPTION") (members SYM...))

All of the SYM... should be proper subsets of the interface.  In addition
to `description' and `members' forms, the entry may optionally include:

  (grok USE-MODULES (lambda (x) CODE))

where CODE implements a group-membership predicate to be applied to `x', a
symbol.  [When evaluated, CODE can assume (use-modules MODULE) has been
executed where MODULE is an element of USE-MODULES, a list.  [NOT YET
IMPLEMENTED!]]

Currently, there are two convenience predicates that operate on `x':
  (in-group? x GROUP)
  (name-prefix? x PREFIX)


Usage from a Scheme Program:
  (scan-api GUILE NM-TYPES SOFILE GROUPINGS) => (META INTERFACE)

The first three args are strings.  GROUPINGS is a (possibly empty) list
of filenames.  The return value is a two-element list, composed of the
alists described above without the `meta' and `interface' initial symbols
(only the fields are included).


Ignorance is Strength ?

  There once was a hacker whose righteous pen
  Carved thought into progress, named SCM.
  Though rough in some places, a recognized gem.
  Though initially closed, 1997 was when...

  Freedom bestowed!, users w/ conscience crowed.
  Now perhaps wisdom of yore can be known and reknowed.
  Precious the time creeps, and indeed it quite flowed
  As euphoria deadened and years flew, disposed.

  Was the gem polished and made to cut through the void?
  Was the past remembered and put to good employ?
  No, only old disk drives know of the joy.
  No, practitioners dumped fine art and profaned, unalloyed.

  Along comes the archeologist, sharpening tools.
  Along comes the criminologist, harping on fools.
  Along comes the poet wannabe, avoiding the duels.
  But the gem is buried beneath a tonnage of stools.

  All is impermanent, the original hacker notes.
  So too this spew is what it connotes.
  Meaning formed, reformed, sound bytes and quotes.
  Love lost and re-cost, the dance of the motes.