lua-users home
lua-l archive

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


Luís Santos wrote:
Would you care to elaborate how could you manage to find the lua functions through PDBs and DLL exports?

1) DLL exports identify the Lua API functions if you are using Lua in a DLL. Readable by anyone knowledgeable about the PE file format or using a tool such the PE File Format DLL and PE File Explorer.
http://www.objmedia.demon.co.uk/freeSoftware/peFileDLL.html
http://www.objmedia.demon.co.uk/freeSoftware/peFileExplorer.html

2) If you are using Lua built into your app and have compiled and linked with debugging symbols those symbols are in PDB files created by Microsoft's compiler. You can then use the DbgHelp API to locate the functions via the symbols in the PDB file. DbgHelp is a documented and freely available API as part of the Windows Developer Tools download on MSDN. Info on DbgHelp here
http://msdn2.microsoft.com/en-us/library/ms679292.aspx

What if I use a different compiler or runtime (MinGW/MSVCRT.DLL) than yours, there could be problems?

I would imagine so. MinGW creates its debug information in stabs or DWARF 2.0 as far as I know. DbgHelp can't read that information. So unless Decoda knows how to read stabs/DWARF you are out of luck there.

I don't work for Decoda - I work for Object Media and Software Verification (we provide
Lua software tools but not a debugger - i.e Decoda complements what we do).
http://www.softwareverify.com/lua/index.html

Regards

Stephen