joyent/mdb_v8#32: fix ::findjsobjects for V8 4.5.x#33
Conversation
|
/cc @davepacheco |
|
Also, one thing I failed to mention in the commit message is that now Buffer instances don't have a property named However, I'm still undecided on whether we would want to display it in the final set of changes. |
c5496b6 to
af31011
Compare
There was a problem hiding this comment.
Is it definitely a problem for there to be no JSTypedArray type? Even on older versions of Node?
There was a problem hiding this comment.
No, it's OK for older versions of node not to have JSTypedArray. Will fix too.
|
I've made a few inline comments. In general, the debugger should present the facts, however ugly. For that reason I prefer reporting the constructor as "Uint8Array", or maybe "Uint8Array (with Buffer prototype)". Thanks! |
|
@davepacheco Thanks for the review, I replied to your comments and I will update this PR shortly. I'll do a bit more research on how to get the actual prototype set on Buffer instances, and I'll keep you posted. |
31ec44f to
249d5c5
Compare
|
@davepacheco I believe I have addressed all your comments. I still need to do more research around how [1] Or rather for the next release of node v4.x, as some metadata is missing in node v4.0 and v4.1. See #34 for more details. |
|
@davepacheco Regarding [1] above, I was mostly confused by the fact that properties of functions' prototypes get a Now, regarding:
Even though I generally agree with the fact that the debugger should represent the facts, I still think it could be confusing for users who are used to use The confusion might be made worse because Thinking out loud: one potential solution would be to add another parameter to At least, we should probably document/communicate around this change. Do you mind if I open a separate issue to discuss potential solutions for this specific use case? |
249d5c5 to
19bf5ed
Compare
|
Squashed commits into a single one and updated commit message + original PR description to match the commit message. |
|
@davepacheco I've actually ran the full tests suite again against all v0.10.40, v0.12.7, v4.0.0 and v4.1.0 node versions, 32 and 64 bits and I added another commit that fixes what I believe is the last remaining issues. If your second review is OK I'll squash these two commits into one. |
|
LGTM! |
966bf63 to
60c8b6c
Compare
|
@davepacheco Thank you! Squashed all commits into one, and made two minor changes:
|
60c8b6c to
c4d540f
Compare
|
Merged. Thanks! I'll wait for #37 and then issue a new release. |
This fixes ::findjsobjects for core dumps generated by Node.js 4.0.x
(and possibly later).
This change fixes how mdb_v8 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 adds a "fallback" member for v8_offsets 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", so ::findjsobjects
-c Buffer won't find any actual Buffer instances, instead one has to use
::findjsobjects -c Uint8Array.