suleram / View8

View8 - Decompiles serialized V8 objects back into high-level readable code.
157 stars 18 forks source link

Long strings are truncated #5

Closed th3spis closed 1 month ago

th3spis commented 2 months ago

Is there any chance to avoid truncating long strings? The patched V8 binary for disassembling is good, but it is not obtaining a string parameters since it is too long:

Screenshot from 2024-09-16 17-35-51

Therefore the decompiled code does not actually contain the real value of the string:

Screenshot from 2024-09-16 17-39-15

j4k0xb commented 2 months ago

remove these lines: https://github.com/v8/v8/blob/0e75d85d8e3467a536bca01d89d8a180a8bcffca/src/objects/string.cc#L694-L699

if (len > kMaxShortPrintLength) {
  accumulator->Add("...<truncated>>");
  accumulator->Add(SuffixForDebugPrint());
  accumulator->Put('>');
  return;
}

Also some unicode strings can't be parsed (ambiguous hex escapes, missing >, etc), needs a workaround

th3spis commented 2 months ago

Great, thank you!