Skip to content

Doc does not describe what's currently implemented in the wild #7

@haberman

Description

@haberman

I was writing a .wasm parser today, and I noticed that the "Hello, World" .wasm file I got from https://webassembly.studio/ includes debug info sections. Here's a list of all sections I found in the file:

     VM SIZE                       FILE SIZE
 --------------                 --------------
   NAN%       0 .debug_info      13.6Ki  30.0%
   NAN%       0 .debug_str       9.38Ki  20.8%
   NAN%       0 .debug_line      7.60Ki  16.8%
   NAN%       0 .debug_abbrev    4.14Ki   9.2%
   NAN%       0 Code             3.86Ki   8.6%
   NAN%       0 .debug_pubtypes  3.10Ki   6.9%
   NAN%       0 Data             1.19Ki   2.6%
   NAN%       0 .debug_pubnames  1.05Ki   2.3%
   NAN%       0 .debug_ranges       353   0.8%
   NAN%       0 name                310   0.7%
   NAN%       0 .debug_loc          276   0.6%
   NAN%       0 Import              102   0.2%
   NAN%       0 Type                 73   0.2%
   NAN%       0 Export               57   0.1%
   NAN%       0 .debug_macinfo       38   0.1%
   NAN%       0 Function             23   0.0%
   NAN%       0 Global               23   0.0%
   NAN%       0 Element              12   0.0%
   NAN%       0 [WASM Header]         8   0.0%
   NAN%       0 Table                 7   0.0%
   NAN%       0 Memory                5   0.0%
 100.0%       0 TOTAL            45.1Ki 100.0%

I found this repo and the doc that describes wasm debugging capabilities. But it doesn't say anything about what is currently implemented. The .debug_* sections above seem to be named like DWARF, but are they actually DWARF? What semantics are implemented?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions