PAGalaxyLab / vxhunter

ToolSet for VxWorks Based Embedded Device Analyses
BSD 2-Clause "Simplified" License
334 stars 70 forks source link

Logging Change Proposal, Bug Fix for VxAnalyzer, and Fail Faster in Netpool Analysis #11

Closed svidovich closed 4 years ago

svidovich commented 4 years ago

Hello! I am back with another PR. I hope that it meets you well!

This PR fixes an exception in analyze_active_task in VxAnalyzer. When active_qhead is None, the function causes an exception. I avoid this by nesting all of that code in an if active_qhead block.

This PR also proposes a change in logging, and if you enjoy the change, I would gladly propagate it throughout the rest of the project. Loggers, in my opinion, should not be a part of the object. Instead, just instantiate a common logger in a script, and have a class use that. Mere suggestion -- if you prefer the way you have it, I will gladly revert.

Finally, I noticed that Netpool analysis could fail faster: since it is unsupported in VxWorks 6.x, we should ask for the VxWorks version immediately, and return immediately supposing that 6.x is chosen.

svidovich commented 4 years ago

Yes -- I'll have it back in soon!

svidovich commented 4 years ago

Okay -- I've got the logging the way it was before -- please check it out and let me know if you're happy!!

dark-lbp commented 4 years ago

There still some codes need to revert and this will make commit history confusion. I will close this PR, please open a new PR from 340c2bf0df0637123960cc610b3199ac5a64430a.