-
Notifications
You must be signed in to change notification settings - Fork 100
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
Reading contents of an Array/ArrayBufferView #89
Comments
Do you mean Array or ArrayBuffer? If the latter: not at the moment. You can take the address of the backing store and print that like you would with normal memory. We could pretty-print ArrayBuffers but we'd need to do something sensible for large arrays, like print only the first 100 elements. If you want to work on it, the logic is in |
@bnoordhuis Thanks for the answer, I actually meant both, but I just realized it does support arrays, I guess the arrays that I've tried somehow errorred in one of the steps of I think we could do a new command for array-like objects (or a new flag to EDIT: just realized there is |
A flag sounds good but the default should probably be conservative for large arraybuffers because those can easily be 100s of MBs and you don't usually want to see every last byte printed. As well, it would be nice if typed arrays printed their values as their natural types (uint8, int32, float64, etc.) instead of simply dumping out the |
@joyeecheung Just curious, were you able to make any progress on this? |
@bnoordhuis I have implemented |
@hhellyer The implementation for |
@joyeecheung - Ah, I suspect that's because the commit comment referenced this with "Fix", sorry about that! |
Hi, at the moment when doing
v8 inspect <address-of-an-array>
llnode would only print the length (and offset & backstore address) of an Array (ArrayBufferView). Are there any support for reading the elements of an Array/ArrayBufferView? Thanks.The text was updated successfully, but these errors were encountered: