Giter Site home page Giter Site logo

Comments (8)

yamt avatar yamt commented on June 20, 2024 1

a quick research on how other projects are reading the dwarf section in wasm:

binaryen: llvm DWARFContext https://github.com/WebAssembly/binaryen/blob/d6c5e4ab15df271521df7b35665c7463b2c490ca/src/wasm/wasm-debug.cpp#L96-L116

cranelift: https://github.com/gimli-rs/gimli (something written in rust)

from wasm-micro-runtime.

yamt avatar yamt commented on June 20, 2024

btw, i wonder why dwarf_extractor.cpp uses the LLDB API, rather than, say, llvm/DebugInfo/DWARF/ api.
@wenyongh do you remember?

from wasm-micro-runtime.

wenyongh avatar wenyongh commented on June 20, 2024

btw, i wonder why dwarf_extractor.cpp uses the LLDB API, rather than, say, llvm/DebugInfo/DWARF/ api. @wenyongh do you remember?

The source debugger feature was implemented by Ant group long time ago, I just cannot remember the details now. Maybe the LLDB API provides more capability?

from wasm-micro-runtime.

TianlongLiang avatar TianlongLiang commented on June 20, 2024

It seems that AOT debugging now only has limited functionality. It was aimed to support C first It hardly covers any additional C++ features. Thus the current function-to-function debug symbol mapping only supports C styles function. And I think that's why it error when it comes to Cpp compiled wasm or Rust compiled wasm

from wasm-micro-runtime.

yamt avatar yamt commented on June 20, 2024

It seems that AOT debugging now only has limited functionality. It was aimed to support C first It hardly covers any additional C++ features. Thus the current function-to-function debug symbol mapping only supports C styles function. And I think that's why it error when it comes to Cpp compiled wasm or Rust compiled wasm

i agree.

i tend to think a fix involves a major surgery like switching from lldb api to llvm api to read dwarf. how do you think?

from wasm-micro-runtime.

TianlongLiang avatar TianlongLiang commented on June 20, 2024

I think it's feasible, but as you said it would be non-trivial changes. BTW, besides the extractor, will there also be some major modifications for code emission and file generation?

from wasm-micro-runtime.

yamt avatar yamt commented on June 20, 2024

I think it's feasible, but as you said it would be non-trivial changes. BTW, besides the extractor, will there also be some major modifications for code emission and file generation?

i guess it will be mostly contained in dwarf_extractor.cpp.

from wasm-micro-runtime.

TianlongLiang avatar TianlongLiang commented on June 20, 2024

i guess it will be mostly contained in dwarf_extractor.cpp.

Got it, thanks

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.