Skip to content

Instantly share code, notes, and snippets.

@Manouchehri
Forked from AnnaMag/.lldbinit
Created December 3, 2017 19:16
Show Gist options
  • Save Manouchehri/6c5ed29d74e9e5483a6ac2efa517d17f to your computer and use it in GitHub Desktop.
Save Manouchehri/6c5ed29d74e9e5483a6ac2efa517d17f 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