Skip to content

Instantly share code, notes, and snippets.

@AnnaMag
Created January 20, 2017 12:15
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save AnnaMag/80644d61795c983f848d6e8fc437f3ea to your computer and use it in GitHub Desktop.
Save AnnaMag/80644d61795c983f848d6e8fc437f3ea to your computer and use it in GitHub Desktop.
helper functions to print V8 Objects
# lldb debugging v8-related functionality in Node.js
# =========================================================
# lldb re-write of user-defined V8 debugging functions
# https://github.com/v8/v8/blob/master/tools/gdbinit
#allow the file to be read when lldb starts (set to false to ignore it)
settings set target.load-cwd-lldbinit true
# Print HeapObjects.
command regex job 's/(.+)/call _v8_internal_Print_Object((void*)(%1))/'
# Print v8::Local handle value.
command regex jlh 's/(^\*.+)/call _v8_internal_Print_Object(*(v8::internal::Object**)(%1))/'
# Print Code objects containing given PC from an internal code address
command regex jco 's/(.+)/call _v8_internal_Print_Code((void*)(%1))/'
# Print TypeFeedbackVector
command regex jfv 's/(.+)/call _v8_internal_Print_TypeFeedbackVector((void*)(%1))/'
# Print DescriptorArray.
command regex jda 's/(.+)/call _v8_internal_Print_DescriptorArray((void*)(%1))/'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment