Git Product home page Git Product logo

Comments (3)

ncannasse avatar ncannasse commented on June 3, 2024

Any pointers on the lib / API required to do that ?

from hashlink.

kLabz avatar kLabz commented on June 3, 2024

libunwind apparently

from hashlink.

kLabz avatar kLabz commented on June 3, 2024

Also, quoting @Apprentice-Alchemist

Re HL call stacks: the JIT has a custom unwinder that relies on frame pointers and is mostly platform independent (but this does mean that it can't give very useful stack traces if there's a lot of foreign code involved, since it only knows about functions generated by the JIT)
https://github.com/HaxeFoundation/hashlink/blob/8a63b99eca0825c3a6dc0574e1404ded4c0eaad1/src/module.c#L41-L210HL/C on the other hand uses native apis, but that's only been implemented for Windows.
https://github.com/HaxeFoundation/hashlink/blob/8a63b99eca0825c3a6dc0574e1404ded4c0eaad1/src/hlc_main.c#L58-L94In the short term HL/C can be fixed by implementing the stack trace / symbol resolution stuff for Linux/macOS/etc. using libunwind.
In the long term it may be a good idea to get rid of the custom unwinder in the JIT and switch to libunwind/windows apis to enable more reliable and useful stacktraces when FFI is involved (both libunwind and windows have support for dynamically generated debug information).

from hashlink.

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.