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: reduce redundant "error:" for `inspect` and `findrefs` #285

Closed oyyd closed 5 years ago

oyyd commented 5 years ago

When inspect or findrefs an invalid expr, llnode will print an error message prefixed with "error: error: error:". This PR will reduce one redundant "error:" for such scenario and it seems that we can't remove the other redundant "error:" by calling SB API only.

Before this PR:

(llnode) v8 inspect invalid_addr
error: error: error: use of undeclared identifier 'invalid_addr'
(llnode) v8 findrefs -v invalid_addr
error: error: error: use of undeclared identifier 'invalid_addr'

After:

(llnode) v8 inspect invalid_addr
error: error: use of undeclared identifier 'invalid_addr'
(llnode) v8 findrefs -v invalid_addr
error: error: use of undeclared identifier 'invalid_addr'

The other redundant "error:" seems to come from here and I couldn't find a way to remove it by calling SB API only.

codecov-io commented 5 years ago

Codecov Report

Merging #285 into master will increase coverage by 0.23%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #285      +/-   ##
=========================================
+ Coverage   80.56%   80.8%   +0.23%     
=========================================
  Files          33      33              
  Lines        4116    4120       +4     
=========================================
+ Hits         3316    3329      +13     
+ Misses        800     791       -9
Impacted Files Coverage Δ
src/llnode.cc 75% <100%> (+1.87%) :arrow_up:
src/llscan.cc 61.31% <100%> (+0.58%) :arrow_up:
test/plugin/scan-test.js 98.97% <100%> (+0.06%) :arrow_up:
src/llv8.cc 76.11% <0%> (-0.16%) :arrow_down:

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 640799a...b678289. Read the comment docs.

mmarchini commented 5 years ago

Landed in 74414fc