Ask Your Question
0

How can I see where Lua dissector gets aborted?

asked 2024-03-12 14:01:06 +0000

Armali gravatar image

updated 2024-03-13 07:38:19 +0000

I have a Lua plugin dissector which in some cases (for some packet in a file when it's opened, but not when clicked on the packet) apparently doesn't run to its end (observed through Lua console printout at entry and exit); it seems silently aborted at some point, I guess due to some error within. No error dialog box, no red packet details line and no Lua console message shows up when the error in the registered dissector code occurs. Isn't there any way to get informed about the place and cause of dissector script abortion?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2024-03-13 07:59:00 +0000

Armali gravatar image

I think there must be a better way, but the only one I've found (besides inserting prints here and there) is setting a debug line hook like

function hookl(event, line)
    print(event..' '..line..' '..tostring(debug.getinfo(2).name))
end
…
    debug.sethook(hookl, 'l')
…
    debug.sethook()

and seeing where the console output stops.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2024-03-12 14:01:06 +0000

Seen: 56 times

Last updated: Mar 13