Re: Need help with debug.

  • From: mejedi@xxxxxxxxx
  • To: luajit@xxxxxxxxxxxxx
  • Date: Fri, 22 May 2020 23:24:31 +0200

Hi Andriy,

Can you capture a core dump? Disclaimer - I have zero experience with embedded, 
but a quick google search reveals that Gdb is capable of handling a core dump 
from a foreign architecture. 
http://disse.cting.org/2013/01/15/2013-01-15-core-dump-analysis-in-crosscompiled-env

In the past I had successfully debugged a crash in LuaJIT interpreter on x86. 
The approach that worked was looking at disassembly and correlating that with 
dynasm sources to understand what was currently in registers to spot anomalies.

Good luck, it seems like this is going to be tricky.

N

On 22 May 2020, at 22:03, Andriy Grytsenko (Redacted sender andriy.grytsenko 
for DMARC) <dmarc-noreply@xxxxxxxxxxxxx> wrote:


Hello!

We are using OpenWRT based solution and use luajit 2.1.0-beta2 for Luci GUI 
back-end. The problem is that /usr/bin/lua crashes on execution of Lua script 
at coroutine.resume() and I found no way to add any debug code as everything 
in LuaJIT seems to be written in some kind of assembler code. Using gdb or 
valgrind isn't possible because it is an device with 32 MB memory and 8 MB 
flash. Could you give any hint if I can do anything? Thanks in advance.

Other related posts: