lua-users home
lua-l archive

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


Hi.

I currently have a remote debugger up and running. My problem is that in
some cases I can't properly evaluate expressions.

For example, lets have this script:

--- BEGIN
local tmp = 3

function f ( n )
	return n + tmp
end

--END

Then I load this script in memory, lua_dobuffer() it, with a breakpoint in
the body of f(). Then, lets say I want to evaluate tmp. My problem is that
tmp is an upvalue, therefore, when the interface sends a query to evaluate
the expression "return tmp", the debugger stub has no information about the
upvalue name. It only knows that f() has 1 upvalue, that's all.

so, if I want to see the tmp variable, I have to change the script as
follows:

--- BEGIN
local tmp = 3

function f ( n )
	local tmp = tmp
	return n + tmp
end


Of course, I'd rather not have to do this and retrieve the information I
need by whatever means is available. I haven't seen one though. Is this
beceause I need to read the manual once again, or is there really nothing I
can do ?


Regards,


Benoit.