[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: lua_Debug issue with source and short_src
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Wed, 6 Nov 2013 08:22:05 -0200
> 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.