lua-users home
lua-l archive

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


> I was trying to use the lua_getstack and lua_getinfo(...,"Sln",...) to get
> debug infos and print a call stack trace but it doesn't seem to get all the
> right informations for some reason... the currentline, linedefined,
> lastlinedefined work just fine but the "source" field always contains the
> entire file and the short_src the "whatever" characters on the first line
> (also "name" sometimes contains some weird characters).

What did you expect instead of what you're getting?

BTW, "source" contains the entire file etc because you're using luaL_loadstring.
You can choose what "source" and "short_src" contain if you use luaL_loadbuffer.