get symbols out of a dylib and map the C++ ones to their demangled names
parent
b7307c2dd6
commit
0f028feb22
|
@ -0,0 +1,15 @@
|
|||
! (c)2010 Joe Groff bsd license
|
||||
USING: alien.cxx.demangle assocs combinators fry io.pathnames
|
||||
kernel macho sequences ;
|
||||
IN: alien.cxx.scaffold
|
||||
|
||||
: library-symbols ( file -- symbols )
|
||||
dup file-extension {
|
||||
{ "dylib" [ dylib-exports ] }
|
||||
{ f [ dylib-exports ] }
|
||||
} case ;
|
||||
|
||||
: c++-library-symbols ( file abi -- symbols )
|
||||
[ library-symbols ] dip
|
||||
[ '[ _ c++-symbol? ] filter ]
|
||||
[ '[ dup _ demangle ] H{ } map>assoc ] bi ;
|
Loading…
Reference in New Issue