Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src: improve messages on PrintInDebugMode #293

Closed
wants to merge 1 commit into from

Conversation

mmarchini
Copy link
Contributor

Add function, file and line information to debug messages.

@mmarchini
Copy link
Contributor Author

Example output:

[llnode][Failure ../src/error.cc:35] Failed to find symbol nodedbg_const_Environment__kContextEmbedderDataIndex__int                                                                                                                                                                                                                                                                                                                         
[llnode][Failure ../src/error.cc:35] Failed to find symbol v8dbg_off_fp_marker                                                                                                                                                                                                                                                                                                                                                               
[llnode][Failure ../src/error.cc:35] Failed to find symbol v8dbg_frametype_JavaScriptFrame                                                                                                                                                                                                                                                                                                                                                   
[llnode][LoadConstant ../src/constants.cc:100] Failed to load constant frametype_JavaScriptFrame, default to -1                                                                                                                                                                                                                                                                                                                              
[llnode][Failure ../src/error.cc:35] Failed to find symbol v8dbg_class_Context__closure_index__int                                                                                                                                                                                                                                                                                                                                           
[llnode][Failure ../src/error.cc:35] Failed to find symbol v8dbg_context_idx_closure                                                                                                                                                                                                                                                                                                                                                         
[llnode][LoadConstant ../src/constants.cc:114] Failed to load constant class_Context__closure_index__int, fallback context_idx_closure, default to -1                                                                                                                                                                                                                                                                                        
[llnode][Failure ../src/error.cc:35] Failed to find symbol v8dbg_class_Context__previous_index__int                                                                                                                                                                                                                                                                                                                                          
[llnode][Failure ../src/error.cc:35] Failed to find symbol v8dbg_class_Context__native_index__int                                                                                                                                                                                                                                                                                                                                            
[llnode][Failure ../src/error.cc:35] Failed to find symbol v8dbg_class_Context__min_context_slots__int                                                                                                                                                                                                                                                                                                                                       
[llnode][Failure ../src/error.cc:35] Failed to find symbol v8dbg_class_Map__instance_attributes__int                                                                                                                                                                                                                                                                                                                                         
[llnode][Failure ../src/error.cc:35] Failed to find symbol v8dbg_class_Map__inobject_properties_or_constructor_function_index__int                                                                                                                                                                                                                                                                                                           
[llnode][Failure ../src/error.cc:35] Failed to find symbol v8dbg_class_Map__inobject_properties__int                                                                                                                                                                                                                                                                                                                                         
[llnode][LoadConstant ../src/constants.cc:114] Failed to load constant class_Map__inobject_properties_or_constructor_function_index__int, fallback class_Map__inobject_properties__int, default to -1                                                                                                                                                                                                                                        
[llnode][Failure ../src/error.cc:35] Failed to find symbol v8dbg_class_Map__instance_size__int                                                                                                                                                                                                                                                                                                                                               
[llnode][Failure ../src/error.cc:35] Failed to find symbol v8dbg_bit_field3_dictionary_map_shift                                                                                                                                                                                                                                                                                                                                             
[llnode][Failure ../src/error.cc:35] Failed to find symbol v8dbg_type_UncompiledDataWithoutPreParsedScope__UNCOMPILED_DATA_WITHOUT_PRE_PARSED_SCOPE_TYPE                                                                                                                                                                                                                                                                                     
[llnode][LoadConstant ../src/constants.cc:100] Failed to load constant type_UncompiledDataWithoutPreParsedScope__UNCOMPILED_DATA_WITHOUT_PRE_PARSED_SCOPE_TYPE, default to -1                                                                                                                                                                                                                                                                
[llnode][Failure ../src/error.cc:35] Failed to find symbol v8dbg_type_UncompiledDataWithPreParsedScope__UNCOMPILED_DATA_WITH_PRE_PARSED_SCOPE_TYPE                                                                                                                                                                                                                                                                                           
[llnode][LoadConstant ../src/constants.cc:100] Failed to load constant type_UncompiledDataWithPreParsedScope__UNCOMPILED_DATA_WITH_PRE_PARSED_SCOPE_TYPE, default to -1                                                                                                                                                                                                                                                                      
[llnode][Failure ../src/error.cc:35] Failed to find symbol v8dbg_class_SharedFunctionInfo__raw_name__Object                                                                                                                                                                                                                                                                                                                                  
[llnode][Failure ../src/error.cc:35] Failed to find symbol v8dbg_class_SharedFunctionInfo__name__Object                                                                                                                                                                                                                                                                                                                                      
[llnode][LoadConstant ../src/constants.cc:114] Failed to load constant class_SharedFunctionInfo__raw_name__Object, fallback class_SharedFunctionInfo__name__Object, default to -1                                                                                                                                                                                                                                                            
[llnode][Failure ../src/error.cc:35] Failed to find symbol v8dbg_class_SharedFunctionInfo__inferred_name__String                                                                                                                                                                                                                                                                                                                             
[llnode][Failure ../src/error.cc:35] Failed to find symbol v8dbg_class_SharedFunctionInfo__script_or_debug_info__Object                                                                                                                                                                                                                                                                                                                      
[llnode][LoadConstant ../src/constants.cc:100] Failed to load constant class_SharedFunctionInfo__script_or_debug_info__Object, default to -1                                                                                                                                                                                                                                                                                                 
[llnode][Failure ../src/error.cc:35] Failed to find symbol v8dbg_class_SharedFunctionInfo__scope_info__ScopeInfo                                                                                                                                                                                                                                                                                                                             
[llnode][LoadConstant ../src/constants.cc:100] Failed to load constant class_SharedFunctionInfo__scope_info__ScopeInfo, default to -1                                                                                                                                                                                                                                                                                                        
[llnode][Failure ../src/error.cc:35] Failed to find symbol v8dbg_class_SharedFunctionInfo__compiler_hints__int                                                                                                                                                                                                                                                                                                                               
[llnode][LoadConstant ../src/constants.cc:100] Failed to load constant class_SharedFunctionInfo__compiler_hints__int, default to -1                                                                                                                                                                                                                                                                                                          
[llnode][Failure ../src/error.cc:35] Failed to find symbol v8dbg_prop_type_mask                                                                                                                                                                                                                                                                                                                                                              
[llnode][LoadConstant ../src/constants.cc:100] Failed to load constant prop_type_mask, default to -1                                                                                                                                                                                                                                                                                                                                         
[llnode][Failure ../src/error.cc:35] Failed to find symbol v8dbg_class_UncompiledData__inferred_name__String                                                                                                                                                                                                                                                                                                                                 
[llnode][LoadConstant ../src/constants.cc:100] Failed to load constant class_UncompiledData__inferred_name__String, default to -1                                                                                                                                                                                                                                                                                                            
[llnode][Failure ../src/error.cc:35] Failed to find symbol v8dbg_class_UncompiledData__start_position__int32_t                                                                                                                                                                                                                                                                                                                               
[llnode][LoadConstant ../src/constants.cc:100] Failed to load constant class_UncompiledData__start_position__int32_t, default to -1                                                                                                                                                                                                                                                                                                          
[llnode][Failure ../src/error.cc:35] Failed to find symbol v8dbg_class_UncompiledData__end_position__int32_t                                                                                                                                                                                                                                                                                                                                 
[llnode][LoadConstant ../src/constants.cc:100] Failed to load constant class_UncompiledData__end_position__int32_t, default to -1                                                                                                                                                                                                                                                                                                            
[llnode][Stringify<llnode::v8::HeapObject> ../src/printer.cc:761] Unknown HeapObject Type 1090 at 0x0000022192016939                                                                                                                                                                                                                                                                                                                         

Copy link
Member

@joyeecheung joyeecheung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice if the verbosity can be specified with environment variables, but LGTM anyway.

@mmarchini mmarchini added the author ready PRs that have at least one approvals, no pending requests for changes, and a CI started. label Sep 20, 2019
Add function, file and line information to debug messages.
@codecov-io
Copy link

codecov-io commented Sep 27, 2019

Codecov Report

Merging #293 into master will increase coverage by 0.55%.
The diff coverage is 40%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #293      +/-   ##
==========================================
+ Coverage   79.48%   80.04%   +0.55%     
==========================================
  Files          33       33              
  Lines        4216     4219       +3     
==========================================
+ Hits         3351     3377      +26     
+ Misses        865      842      -23
Impacted Files Coverage Δ
src/error.h 85.71% <ø> (ø) ⬆️
src/llscan.cc 61.25% <0%> (-0.08%) ⬇️
src/llnode.cc 74.2% <0%> (ø) ⬆️
src/llv8.cc 76.21% <0%> (+2.23%) ⬆️
src/printer.cc 79.55% <100%> (+0.03%) ⬆️
src/error.cc 84.21% <100%> (ø) ⬆️
src/llv8-inl.h 93.64% <100%> (+1.05%) ⬆️
src/constants.cc 81.35% <66.66%> (ø) ⬆️
src/llv8-constants.cc 83.49% <0%> (+0.97%) ⬆️
... and 3 more

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 a501635...2dfee96. Read the comment docs.

mmarchini added a commit that referenced this pull request Sep 27, 2019
Add function, file and line information to debug messages.

PR-URL: #293
Reviewed-By: Joyee Cheung <[email protected]>
@mmarchini
Copy link
Contributor Author

Landed in 9449d99

@mmarchini mmarchini closed this Sep 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approvals, no pending requests for changes, and a CI started.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants