-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#32: fix ::findjsobjects for V8 4.5.x
This change is a work in progress to fix ::findjsobjects for core dumps generated by Node.js 4.0.x (and possibly later). The current status of this change fixes how mdb_v8 gets retrieves the constructor of a JavaScript object given its Map. It also fixes the problem of accessing objects' properties that was caused by a typo in "v8db_propindex_mask" that should have been "v8db_prop_index_mask" (note the underscore in "prop_index") in my previous changes. It has a "fallbacks" members for v8_offets so that we can have a fallback for typed arrays' length's offset. Finally, this change allows ::findjsobjects to find Buffer instances and inspect them. However, due to how Buffer instances are implemented in node v4.x and later, they are currently seen by mdb_v8 as having a constructor named "Uint8Array" instead of "Buffer". Even though Buffer instances are actually now Uint8Array instances, their prototype is set to Buffer.prototype, and someBufferInstance.constructor.name returns 'Buffer', so mdb_v8 should be able to get 'Buffer' as the constructor name. It fixes #32 in its current state, and it represents some progress but I still want to investigate why we can't get the proper constructor name for Buffer instances.
- Loading branch information
1 parent
0408e3b
commit c5496b6
Showing
3 changed files
with
168 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters