Hi,

--- On Fri, Feb 2, 2018 at 9:01 PM, Peter Wu <pe...@lekensteyn.nl> wrote:
> It looks like "console.lua" is setting the "debug" function. Perhaps
> those "helpers" should be removed or namespaced, as a workaround you can
> just comment the debug function:
>
>     -- function debug(x) ... end

I tried the above, but, when Wireshark is started, it actually throws
the error at:

"~/.luarocks/share/lua/5.1/luacov/hook.lua:26:attempt to index global
'debug' (a function value)".

In hook.lua, when the local variable "name" is assigned to the full
path of the Lua plugin prefixed by "@", the coverage statistics get
generated. Bascially, the following is used to retrieve the name:

  local name = debug.getinfo(level, "S").source -- returns "@dissector.lua"

So, the following hard-coded assginment works:

  local name = "@dissector.lua"
  local prefixed_name = string.match(name, "^@(.*)")

I am not sure why debug module or function is used to retrieve the
path to the Wireshark Lua plugin. Will check with the Luacov author.

Thanks for your reply. Appreciate it!

SK

-- 
Shakthi Kannan
http://www.shakthimaan.com
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@wireshark.org>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe

Reply via email to