Coder Social home page Coder Social logo

Comments (5)

lum1n0us avatar lum1n0us commented on May 29, 2024 1

#3199

Before running this script, please make sure:
  - the wasm file is compiled with debug info. (like: clang -g) 
  - the call-stack dump is generated by iwasm
  - iwasm is compiled with -DWAMR_BUILD_DUMP_CALL_STACK=1
  - iwasm isn't running under fast-interp mode. -DWAMR_FAST_INTERP=0
  - if using .aot, the aot file is generated with `--enable-dump-call-stack`

from wasm-micro-runtime.

lum1n0us avatar lum1n0us commented on May 29, 2024

Nice catch. It is a bug of addr2line.py.

from wasm-micro-runtime.

lum1n0us avatar lum1n0us commented on May 29, 2024

#3194

from wasm-micro-runtime.

eloparco avatar eloparco commented on May 29, 2024

Hi @lum1n0us, thanks for the quick reply! I tried the fix in #3194, now I get the backtrace but it's not correct:

#00: 0x004a - $f3
#01: 0x00a9 - $f4 (FILE:trap.c LINE:   10 COLUMN:  7 FUNC:b)
#02: 0x0070 - $f5 (FILE:trap.c LINE:    3 COLUMN:  0 FUNC:c)
#03: 0x0091 - $f6 (FILE:trap.c LINE:    9 COLUMN:  0 FUNC:b)
#04: 0x0088 - _start (FILE:trap.c LINE:    9 COLUMN:  0 FUNC:b)

I was comparing the script to https://github.com/bytecodealliance/wasm-tools/blob/main/src/bin/wasm-tools/addr2line.rs, but couldn't find what the problem is.

Also, looking at #3194, I guess the addresses printed by iwasm are already relative to the code section, is that why the PR removes the code section subtraction?

from wasm-micro-runtime.

eloparco avatar eloparco commented on May 29, 2024

Thanks for the fix, closing the issue.
I have some changes that I want to add to the script, I'll raise a PR once #3199 is merged

from wasm-micro-runtime.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.