Skip to content
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

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

Open
haberman opened this issue Jul 19, 2018 · 1 comment
Open

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

haberman opened this issue Jul 19, 2018 · 1 comment

Comments

@haberman
Copy link

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?

@fitzgen
Copy link
Owner

fitzgen commented Jul 19, 2018

Thanks for bringing this up.

Yes, they are DWARF. Their inclusion is due to a pretty recent change in LLVM trunk. I don't know the exact semantics and there is no standard for how DWARF applies to wasm yet. The wasm WG is setting up a sub-charter for debugging, and I expect that group to provide some guidance once it is up and running.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants