• Simon Zünd's avatar
    [stack-trace] Change column number for wasm frames to module offset · f16f0bcc
    Simon Zünd authored
    The CL https://crrev.com/c/1646846 changed column numbers for Wasm
    frames in Error.stack traces. Instead of using the offset relative to
    the beginning of the function, the absolute offset inside the module
    is displayed as hex.
    
    This CL propagates that change to the StackTrace C++ API, so
    StackFrame::GetColumn() also returns the absolute offset. Note that the
    StackFrame API historically uses "0" to signal "no information", so the
    line and column numbers for Wasm frames are also adjusted to 1-based,
    even though they signify function index and absolute offset
    into the module.
    
    This CL does not touch Script::PositionInfo.column. That field still
    contains the offset relative to the function start.
    
    Bug: v8:8742
    Change-Id: If4fd37fa681c7ebd0823ce0d95eccc1335c35272
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1655300
    Commit-Queue: Simon Zünd <szuend@chromium.org>
    Reviewed-by: 's avatarBen Titzer <titzer@chromium.org>
    Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#62171}
    f16f0bcc
test-wasm-trap-position.cc 5.84 KB