The debugger uses debug.info(1, 'S').source to determine the mapping between 
function and source code.Please see lua's docs

https://www.lua.org/manual/5.3/manual.html#lua_Debug

> source: the name of the chunk that created the function. If source starts 
> with a '@', it means that the function was defined in a file where the file 
> name follows the '@'. If source starts with a '=', the remainder of its 
> contents describe the source in a user-dependent manner. Otherwise, the 
> function was defined in a string where source is that string.

When the `source` starts with neither '@' nor '=', the content in the `source` 
is the source code. And the fourth parameter of luaL_loadbuffer determines the 
`source` of the loaded function.

But now iuplua_dostring/iuplua_dobuffer does not comply with this rule. The 
function loaded by iuplua_dostring, the `source` starts with neither '@' nor 
'=', so the debugger thinks it is the source code itself, but this is wrong.

Can iup make iuplua_dostring use the correct `source`? Add '=' before name or 
use 's' instead of 'name'.

-- actboy168

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users

Reply via email to