Skip to content

Javascript API for llnode? #14

Description

@rnchamberlain

@indutny @hhellyer
Hi Fedor, we've been discussing the possibility of an NPM/Javascript API on top of llnode, so that diagnostic tools could be written that exploit the llnode+lldb libraries. An alternative to using the line-mode lldb debugger + plugin itself to read a core dump. For example, an interactive web viewer for core dumps that are stored on a node server. Also possibility of user add-ons written in Javascript.

Here's a very basic prototype, just to load a core dump and list the thread stacks:
indutny/llnode@master...rnchamberlain:llnode_api

Any thoughts? Would need to design the API, make the calls async etc etc

Activity

  1. indutny commented on Jun 22, 2016

    @indutny
    Member

    Hello!

    I totally enjoy the idea, it sounds lovely! Considering that there are quite a lot of people interested in this kind of thing:

    https://github.com/nodejs/post-mortem

    Do you think it may be worth opening an issue, and having some kind of discussion or even call?

    This JS API looks amazing!

  2. langhuihui commented on Sep 25, 2017

    @langhuihui

    When it will be done?

  3. rnchamberlain commented on Sep 27, 2017

    @rnchamberlain
    ContributorAuthor

    @langhuihui Unfortunately I have not had time to work on this much this year. I have 2 branches, both quite old now (there has been quite a lot of other development on llnode recently):
    https://github.com/rnchamberlain/llnode/tree/llnode_api
    https://github.com/rnchamberlain/llnode/tree/javascript-api

    There was also some discussion and other contributions in the post mortem workgroup:
    nodejs/post-mortem#33

  4. joyeecheung commented on Oct 5, 2017

    @joyeecheung
    Member

    I am interested in picking this one up. Will try to rebase previous work to master first.

  5. joyeecheung commented on Oct 13, 2017

    @joyeecheung
    Member

    Some progress: got it working on MacOS and Ubuntu with linked libraries detected using llvm-config. Rewrote the API layer using Nan and bindings. Can load Linux coredumps on MacOS now. Will try to build a more full-fledged demo and polish the API on top of that.

    https://github.com/joyeecheung/llnode/tree/js-api

  6. No9 commented on Oct 13, 2017

    @No9
    Member

    @joyeecheung will take a look on FreeBSD over the weekend

  7. joyeecheung commented on Oct 16, 2017

    @joyeecheung
    Member

    A few more progress: put the module (inherits ObjectWrap now) and the API into classes. To actually make it possible to instantiate multiple instances would require some surgery in llscan.cc and llnode.cc to remove the dependency on that global llv8 instance. The plan is to open a PR when the API is ready, not necessarily when the multiple instantiation is ready.

  8. joyeecheung commented on Nov 4, 2017

    @joyeecheung
    Member

    Another progress: redesigned the API a bit, it's documented in https://github.com/joyeecheung/llnode/blob/js-api/JSAPI.md, the instance iterators is still WIP but the other parts are done and tested in https://github.com/joyeecheung/llnode/blob/js-api/test/jsapi-test.js

  9. langhuihui commented on Nov 10, 2017

    @langhuihui

    great job

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions