Open rnchamberlain opened 8 years ago
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!
When it will be done?
@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: https://github.com/nodejs/post-mortem/issues/33
I am interested in picking this one up. Will try to rebase previous work to master first.
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.
@joyeecheung will take a look on FreeBSD over the weekend
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.
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
great job
@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: https://github.com/indutny/llnode/compare/master...rnchamberlain:llnode_api
Any thoughts? Would need to design the API, make the calls async etc etc