lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Thu, Nov 18, 2010 at 3:10 PM, Mike Pall <mikelu-1011@mike.de> wrote:
> Josh Haberman wrote:
>> Have you considered getting this information by reading DWARF symbols as
>> an alternative to parsing C code?  That could lead to an easier-to-use
>> interface for the case where you are calling into a shared lib.
>>
>> libc = ffi.loadso("/lib/libc.so")
>
> I've considered that option. But /lib/libc.so.* doesn't have any
> debug info on most installations. Neither do the other commonly
> installed libraries.
>
> Also, deployment would be problematic, since this requires all
> user systems to have full debug symbols, too. And it wouldn't work
> on non-DWARF systems at all.

Would it be possible to load a C header file using FFI to get this
debug info (along with constants such as the various errnos?). Then
loading the *.so would "simply" mean looking for functions listed in
the header files that have been loaded?

-- 
- Patrick Donnelly