|Re: LDT/Wireshark: Breakpoints don't work [message #1016842 is a reply to message #1016374]
||Thu, 07 March 2013 21:09
| Julien Desgats
Registered: August 2012
Actually, each time Lua VM loads a chunk of source code, it can optionally give it a source name. By convention, code loaded from files gets "@<filename>" as source name.|
However, when you load code from load, loadstring or lua_load (for C side), you can give the name you want.
The problem is that currently, LDT can only debug code loaded from files so any chunk of code which is loaded from a file (dynamic code is not handled), that's why we look for a "@" char at first position.
So I guess that Wireshark load code from a custom loader for some reason (maybe for security/sandboxing ?) and does not use the "@" convention and set directly path without prefix as source name. So the code is treated as an unknown code and debugger will never break into it.
To be sure can you set something like this in your code :
-- gets the source name of the calling function
If this is the case, it becomes impossible to distinguish file based code from other code. So sadly, your fix would not work in general case. If my thoughts are rights (missing @ prefix), it's more a Wireshark issue and they should stick with Lua convention.
Powered by FUDForum
. Page generated in 0.01835 seconds