nodejs / llnode

An lldb plugin for Node.js and V8, which enables inspection of JavaScript states for insights into Node.js processes and their core dumps.
Other
1.15k stars 99 forks source link

src: Treat embeded builtins as V8 functions #301

Closed mmarchini closed 4 years ago

mmarchini commented 4 years ago

On Node.js v12 most builtins are compiled during build time and embeded in the binary. Because of that, LLDB will think it knows how to handle these frames (especially JavaScript frames). To correctly handle those frames, we check the function name, if it starts with Builtins_ we'll handle it as a JIT function. This method should be safe since any C++ function coming from V8 or Node.js will be mangled, thus beginning with _Z.... There might be a better way to handle this, but for now this check should be enough.

codecov-io commented 4 years ago

Codecov Report

Merging #301 into master will increase coverage by 0.29%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #301      +/-   ##
==========================================
+ Coverage    78.6%   78.89%   +0.29%     
==========================================
  Files          33       33              
  Lines        4225     4227       +2     
==========================================
+ Hits         3321     3335      +14     
+ Misses        904      892      -12
Impacted Files Coverage Δ
src/llnode.cc 74.4% <100%> (+0.2%) :arrow_up:
src/llv8.cc 71.58% <0%> (+0.46%) :arrow_up:
src/llv8-inl.h 93.43% <0%> (+0.84%) :arrow_up:
src/llv8-constants.cc 83.49% <0%> (+0.97%) :arrow_up:
src/llv8-constants.h 100% <0%> (+1.51%) :arrow_up:
src/llv8.h 83.33% <0%> (+2.38%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 2c4c99c...a903447. Read the comment docs.

mmarchini commented 4 years ago

cc @nodejs/llnode

mmarchini commented 4 years ago

Landed in 2964af5