1. 27 May, 2020 1 commit
    • Benedikt Meurer's avatar
      [inspector] Report length and endColumn correctly for Wasm. · 03ba73e4
      Benedikt Meurer authored
      Previously both the length and the endColumn for Wasm scripts were
      reported as 0, and that was sort of okayish, since the front-end
      was ignoring both of these fields in case of Wasm, and was applying
      special cases. But these special casing lead to some subtle bugs,
      and this is the first step towards a more uniform treatment.
      
      Source positions for Wasm are in terms of the bytecode, and the
      column field contains the bytecode offset here, while the line
      number field is always 0. Hence we send 0 for both startLine and
      endLine as before, but endColumn now corresponds to the bytecode
      size.
      
      Bug: chromium:1056632
      Change-Id: Ia8a9cfe454ed250b87a524f5cbcbbbe242205db6
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2215817
      Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
      Commit-Queue: Yang Guo <yangguo@chromium.org>
      Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#67997}
      03ba73e4
  2. 05 May, 2020 1 commit
  3. 06 Apr, 2020 3 commits
  4. 03 Apr, 2020 2 commits
  5. 17 Mar, 2020 1 commit
  6. 24 Feb, 2020 1 commit
  7. 17 Feb, 2020 1 commit
  8. 22 Jan, 2020 1 commit
  9. 09 Jan, 2020 1 commit
  10. 15 Nov, 2019 1 commit
    • Eric Leese's avatar
      Report real module in addition to fake scripts · 6ec6ed9c
      Eric Leese authored
      Currently the inspector reports Wasm in one of two ways:
       - If there is a source map, report one script per Wasm script, with
         bytecode but no source.
       - If there is no source map, report one script per Wasm function, with
         source (Wasm disassembly) but no bytecode.
      
      With this change, behavior with source map is same, but without source
      map it will report both ways. This will allow us to change the frontend
      to do its own disassembly, allowing us to remove the per-function scripts
      in a future change.
      
      Bug: chromium:1013527
      Change-Id: I0c559ad08896e8d0da419e3c6ad8d1edff3976fc
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1899782Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
      Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
      Commit-Queue: Eric Leese <leese@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#64980}
      6ec6ed9c
  11. 31 Oct, 2019 1 commit
  12. 30 Oct, 2019 1 commit
    • Ingvar Stepanyan's avatar
      [wasm] Prefer source map over DWARF info if present · d8f95c4b
      Ingvar Stepanyan authored
      Some tools that transform Wasm today, already support encoding the
      transforms and correctly updating locations in source maps, but not yet
      in DWARF (although this is being worked on).
      
      Until they catch up, it's best to consistently prefer source maps over
      DWARF when both are present, and not just rely on order of sections as
      accidentally done in the previous CL that introduced DWARF info.
      
      Ref: crrev.com/c/v8/v8/+/1834341
      Bug: chromium:1016772
      Change-Id: I769311e2096ae0e4ca304bef0a0453c7e0776aae
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1888930
      Commit-Queue: Ingvar Stepanyan <rreverser@google.com>
      Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#64647}
      d8f95c4b
  13. 08 Oct, 2019 2 commits
    • Jakob Kummerow's avatar
      [strings] Introduce "is not integer index" bit · c203163d
      Jakob Kummerow authored
      This is useful for the upcoming "huge TypedArrays" support, to be able
      to quickly decide in stubs/generated code whether a string used as the
      key for a property load/store can possibly be an exotic integer index.
      
      Bug: v8:4153
      Change-Id: I50ce655d2f78fb36e5615fd580f22c9290216c84
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1821460
      Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
      Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#64165}
      c203163d
    • Ingvar Stepanyan's avatar
      [wasm] Pretend that DWARF section is a fake source map · 1b5f3be0
      Ingvar Stepanyan authored
      Unfortunately, codebase contains lots of places that use one of the two
      formats as an internal representation for Wasm locations:
      1) {line: 0, column: byte offset within entire module}
      2) {line: function index, column: byte offset within function}
      
      These places choose these formats interchangeably and convert from one
      to another depending on the presence of source map URL in Wasm.
      
      This is not very convenient and makes it hard to add support for DWARF
      which should behave just like Wasm with source maps - that is, report a
      raw Wasm script instead of fake scripts per each disassembled function,
      and use representation (1) instead of (2) internally.
      
      I tried to refactor these locations and avoid checking for source map
      URLs in the previous CL - https://crrev.com/c/v8/v8/+/1833688. However,
      it quickly got out of hand, and updating code in one place just kept
      revealing yet another that gets broken by the changes, so I made a
      decision to abandon it and leave to someone who knows the codebase
      better.
      
      Instead, this CL is based on https://crrev.com/c/v8/v8/+/1809375, but,
      rather than trying to integrate DWARF separately and only for supported
      agents, it pretends that encountering DWARF section is the same as
      encountering a `sourceMappingURL` section with fake URL "wasm://dwarf".
      
      This ensures that Wasm with DWARF behaves exactly in the same way as
      Wasm with source maps, just like we want, with minimal changes to the
      codebase. The only downside is that frontends without DWARF support
      won't get even a disassembled version of Wasm that contains DWARF info.
      This is unfortunate, but, as per previous discussions, should be fine
      given current state of Wasm debugging.
      
      Change-Id: Ia7256075e4bfd2f407d001d02b96883d7267436e
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1834341
      Commit-Queue: Ingvar Stepanyan <rreverser@google.com>
      Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#64157}
      1b5f3be0
  14. 02 Oct, 2019 1 commit
  15. 25 Sep, 2019 1 commit
    • Ingvar Stepanyan's avatar
      Add support for reporting raw Wasm scripts · c7848612
      Ingvar Stepanyan authored
      This addition will allow to experiment with parsing DWARF information from
      WebAssembly on the frontend side for improved debugging.
      
      The frontend must explicitly opt-in to this experiment by setting
      `supportsWasmDwarf: true` in `Debugger.enable` params.
      
      When this option is present, and Wasm appears to contain DWARF information
      (heuristic: `.debug_info` custom section is present), V8 will not try to
      disassemble and report each WebAssembly function as a separate fake script, but
      instead will report Wasm module as a whole.
      
      Note that V8 already does this when Wasm is associated with a source map.
      
      Additionally, this CL adds a dedicated `Debugger.getWasmBytecode` command that
      accepts scriptId and returns raw wire bytes of the chosen WebAssembly module.
      
      Change-Id: I7a6e80daf8d91ffaaba04fa15688f2ba9552870f
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1809375
      Commit-Queue: Ingvar Stepanyan <rreverser@google.com>
      Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#63969}
      c7848612
  16. 18 Sep, 2019 1 commit
  17. 06 Dec, 2017 1 commit
  18. 19 May, 2017 1 commit
  19. 07 Apr, 2017 1 commit
    • Clemens Hammacher's avatar
      [wasm] Implement extensible name section · 1a73f73b
      Clemens Hammacher authored
      The format of the name section changed recently. It now contains
      subsections of different type (currently for function names or local
      variable names).
      This CL changes our internal wasm module builders (in JS and C++) to
      emit this new format, and changes the decoder to understand it.
      We currently only parse the function name section, and ignore names of
      local variables. I will later extend this to parse local variable names
      when needed for debugging.
      
      R=ahaas@chromium.org, rossberg@chromium.org
      BUG=v8:6222
      
      Change-Id: I2627160c25c9209a3f09abe0b88941ec48b24434
      Reviewed-on: https://chromium-review.googlesource.com/470247
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Reviewed-by: 's avatarAndreas Rossberg <rossberg@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#44492}
      1a73f73b
  20. 09 Feb, 2017 1 commit
  21. 15 Jan, 2017 1 commit
  22. 13 Jan, 2017 2 commits
  23. 12 Jan, 2017 4 commits
  24. 06 Dec, 2016 1 commit
    • clemensh's avatar
      [inspector] Introduce debug::WasmScript · 12cdb31b
      clemensh authored
      *and* report all "virtual" wasm scripts right when the wasm script is
      registered at the inspector.
      
      WasmScript is a subtype of Script, with the cast checking that it is
      actually a wasm script.
      This layout makes it quite easy to implement functionality that is only
      available for wasm scripts, and allows to later directly use the
      WasmCompiledModule instead of the i::Script for backing the
      debug::WasmScript. We might also add virtual methods to
      provide different implementations for GetSourcePosition, Source and
      others.
      
      DisassembleWasmFunction now also becomes a method of this class instead
      of a static function on the DebugInterface.
      
      The WasmTranslation now uses the new WasmScript type instead of the
      Script wrapper, and also registers all virtual wasm scripts immediately
      when the wasm script is made public to the inspector (when the wasm
      module is created).
      
      R=yangguo@chromium.org,dgozman@chromium.org,titzer@chromium.org
      BUG=chromium:613110,chromium:659715
      
      Review-Url: https://codereview.chromium.org/2531163010
      Cr-Commit-Position: refs/heads/master@{#41519}
      12cdb31b