Stream: git-wasmtime

Topic: wasmtime / PR #1410 support a few DWARF-5 only features


view this post on Zulip Wasmtime GitHub notifications bot (Mar 26 2020 at 00:51):

ggreif opened PR #1410 from master to master:

TODO:

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Mar 26 2020 at 00:52):

ggreif edited PR #1410 from master to master:

TODO:

See #932.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Mar 26 2020 at 00:54):

ggreif edited PR #1410 from master to master:

TODO:

See #932.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Mar 26 2020 at 00:58):

ggreif edited PR #1410 from master to master:

TODO:

See #932.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Mar 26 2020 at 00:58):

ggreif edited PR #1410 from master to master:

TODO:

See #932.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Mar 26 2020 at 01:02):

ggreif updated PR #1410 from master to master:

TODO:

See #932.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Mar 26 2020 at 11:57):

ggreif updated PR #1410 from master to master:

TODO:

See #932.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Mar 26 2020 at 11:58):

ggreif edited PR #1410 from master to master:

TODO:

See #932.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Mar 26 2020 at 12:23):

ggreif edited PR #1410 from master to master:

TODO:

See #932.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Mar 26 2020 at 12:28):

ggreif edited PR #1410 from master to master:

This is WIP, but please _feel free to have a look_ if you are interested in DWARF-5 support!

TODO:

See #932.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Mar 26 2020 at 13:15):

yurydelendik assigned PR #1410 to yurydelendik.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 26 2020 at 13:22):

ggreif updated PR #1410 (assigned to yurydelendik) from master to master:

This is WIP, but please _feel free to have a look_ if you are interested in DWARF-5 support!

TODO:

See #932.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Mar 26 2020 at 13:29):

ggreif edited PR #1410 (assigned to yurydelendik) from master to master:

This is WIP, but please _feel free to have a look_ if you are interested in DWARF-5 support!

TODO:

See #932.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Mar 26 2020 at 13:30):

ggreif edited PR #1410 (assigned to yurydelendik) from master to master:

This is WIP, but please _feel free to have a look_ if you are interested in DWARF-5 support!

TODO:

See #932.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Mar 26 2020 at 13:36):

ggreif edited PR #1410 (assigned to yurydelendik) from master to master:

This is WIP, but please _feel free to have a look_ if you are interested in DWARF-5 support!

TODO:

See #932.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Mar 26 2020 at 13:50):

ggreif edited PR #1410 (assigned to yurydelendik) from master to master:

This is WIP, but please _feel free to have a look_ if you are interested in DWARF-5 support!

TODO:

See #932.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Apr 15 2020 at 18:08):

ggreif updated PR #1410 (assigned to yurydelendik) from master to master:

This is WIP, but please _feel free to have a look_ if you are interested in DWARF-5 support!

TODO:

See #932.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Apr 16 2020 at 00:09):

ggreif updated PR #1410 (assigned to yurydelendik) from master to master:

This is WIP, but please _feel free to have a look_ if you are interested in DWARF-5 support!

TODO:

See #932.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Apr 16 2020 at 00:28):

ggreif edited PR #1410 (assigned to yurydelendik) from master to master:

This is WIP, but please _feel free to have a look_ if you are interested in DWARF-5 support!

TODO:

See #932.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Apr 17 2020 at 19:25):

ggreif updated PR #1410 (assigned to yurydelendik) from master to master:

This is WIP, but please _feel free to have a look_ if you are interested in DWARF-5 support!

TODO:

See #932.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Apr 17 2020 at 19:35):

ggreif updated PR #1410 (assigned to yurydelendik) from master to master:

This is WIP, but please _feel free to have a look_ if you are interested in DWARF-5 support!

TODO:

See #932.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Apr 18 2020 at 17:42):

ggreif updated PR #1410 (assigned to yurydelendik) from master to master:

This is WIP, but please _feel free to have a look_ if you are interested in DWARF-5 support!

TODO:

See #932.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Apr 19 2020 at 20:59):

ggreif edited PR #1410 (assigned to yurydelendik) from master to master:

This is WIP, but please _feel free to have a look_ if you are interested in DWARF-5 support!

TODO:

Error: failed to run main module `fib-wasm-dwarf5.wasm`

Caused by:
    0: Debug information error
    1: Unexpected .debug_line_str
Process 30014 exited with status = 1 (0x00000001)

See #932.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Apr 19 2020 at 21:00):

ggreif edited PR #1410 (assigned to yurydelendik) from master to master:

This is WIP, but please _feel free to have a look_ if you are interested in DWARF-5 support!

TODO:

Error: failed to run main module `fib-wasm-dwarf5.wasm`

Caused by:
    0: Debug information error
    1: Unexpected .debug_line_str
Process 30014 exited with status = 1 (0x00000001)

See #932.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Apr 20 2020 at 11:11):

ggreif updated PR #1410 (assigned to yurydelendik) from master to master:

This is WIP, but please _feel free to have a look_ if you are interested in DWARF-5 support!

TODO:

Error: failed to run main module `fib-wasm-dwarf5.wasm`

Caused by:
    0: Debug information error
    1: Unexpected .debug_line_str
Process 30014 exited with status = 1 (0x00000001)

See #932.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Apr 20 2020 at 15:22):

ggreif updated PR #1410 (assigned to yurydelendik) from master to master:

This is WIP, but please _feel free to have a look_ if you are interested in DWARF-5 support!

TODO:

Error: failed to run main module `fib-wasm-dwarf5.wasm`

Caused by:
    0: Debug information error
    1: Unexpected .debug_line_str
Process 30014 exited with status = 1 (0x00000001)

See #932.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Apr 20 2020 at 21:10):

ggreif updated PR #1410 (assigned to yurydelendik) from master to master:

This is WIP, but please _feel free to have a look_ if you are interested in DWARF-5 support!

TODO:

Error: failed to run main module `fib-wasm-dwarf5.wasm`

Caused by:
    0: Debug information error
    1: Unexpected .debug_line_str
Process 30014 exited with status = 1 (0x00000001)

See #932.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Apr 22 2020 at 11:22):

ggreif updated PR #1410 (assigned to yurydelendik) from master to master:

This is WIP, but please _feel free to have a look_ if you are interested in DWARF-5 support!

TODO:

Error: failed to run main module `fib-wasm-dwarf5.wasm`

Caused by:
    0: Debug information error
    1: Unexpected .debug_line_str
Process 30014 exited with status = 1 (0x00000001)

See #932.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Apr 22 2020 at 11:23):

ggreif updated PR #1410 (assigned to yurydelendik) from master to master:

This is WIP, but please _feel free to have a look_ if you are interested in DWARF-5 support!

TODO:

Error: failed to run main module `fib-wasm-dwarf5.wasm`

Caused by:
    0: Debug information error
    1: Unexpected .debug_line_str
Process 30014 exited with status = 1 (0x00000001)

See #932.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Apr 22 2020 at 13:10):

ggreif updated PR #1410 (assigned to yurydelendik) from master to master:

This is WIP, but please _feel free to have a look_ if you are interested in DWARF-5 support!

TODO:

Error: failed to run main module `fib-wasm-dwarf5.wasm`

Caused by:
    0: Debug information error
    1: Unexpected .debug_line_str
Process 30014 exited with status = 1 (0x00000001)

See #932.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Apr 22 2020 at 13:12):

ggreif updated PR #1410 (assigned to yurydelendik) from master to master:

This is WIP, but please _feel free to have a look_ if you are interested in DWARF-5 support!

TODO:

Error: failed to run main module `fib-wasm-dwarf5.wasm`

Caused by:
    0: Debug information error
    1: Unexpected .debug_line_str
Process 30014 exited with status = 1 (0x00000001)

See #932.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Apr 22 2020 at 19:45):

ggreif updated PR #1410 (assigned to yurydelendik) from master to master:

This is WIP, but please _feel free to have a look_ if you are interested in DWARF-5 support!

TODO:

Error: failed to run main module `fib-wasm-dwarf5.wasm`

Caused by:
    0: Debug information error
    1: Unexpected .debug_line_str
Process 30014 exited with status = 1 (0x00000001)

See #932.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Apr 22 2020 at 22:44):

ggreif updated PR #1410 (assigned to yurydelendik) from master to master:

This is WIP, but please _feel free to have a look_ if you are interested in DWARF-5 support!

TODO:

Error: failed to run main module `fib-wasm-dwarf5.wasm`

Caused by:
    0: Debug information error
    1: Unexpected .debug_line_str
Process 30014 exited with status = 1 (0x00000001)

See #932.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Apr 22 2020 at 23:29):

ggreif updated PR #1410 (assigned to yurydelendik) from master to master:

This is WIP, but please _feel free to have a look_ if you are interested in DWARF-5 support!

TODO:

Error: failed to run main module `fib-wasm-dwarf5.wasm`

Caused by:
    0: Debug information error
    1: Unexpected .debug_line_str
Process 30014 exited with status = 1 (0x00000001)

See #932.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Apr 23 2020 at 01:04):

ggreif updated PR #1410 (assigned to yurydelendik) from master to master:

This is WIP, but please _feel free to have a look_ if you are interested in DWARF-5 support!

TODO:

Error: failed to run main module `fib-wasm-dwarf5.wasm`

Caused by:
    0: Debug information error
    1: Unexpected .debug_line_str
Process 30014 exited with status = 1 (0x00000001)

See #932.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Apr 23 2020 at 14:59):

yurydelendik submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 23 2020 at 15:03):

yurydelendik submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 23 2020 at 15:03):

yurydelendik created PR Review Comment:

This is used in DebugAddrIndex and it looks like it is compiled unit attribute?

view this post on Zulip Wasmtime GitHub notifications bot (Apr 23 2020 at 15:13):

yurydelendik submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 23 2020 at 15:13):

yurydelendik created PR Review Comment:

I don't think removing it fixes the issue? I would like to see some guaranties that all ranges are transformed, e.g. range that spans multiple functions (IIRC RangeInfoBuilder/AddressTransform can do only inner function transforms)

view this post on Zulip Wasmtime GitHub notifications bot (Apr 23 2020 at 15:55):

ggreif submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 23 2020 at 15:55):

ggreif created PR Review Comment:

From my moc test:
Input

              DW_AT_ranges [DW_FORM_sec_offset] (0x0000000c
                 [0x00000007, 0x00000013)
                 [0x00000018, 0x00000038)
                 [0x0000003d, 0x00000067)
                 [0x0000006c, 0x00000081)
                 [0x00000086, 0x000000df)
                 [0x000000e4, 0x000000ed)
...

Output by wasm2obj:

0x0000000b: DW_TAG_compile_unit [1] *
              DW_AT_ranges [DW_FORM_sec_offset] (0x00000000
                 [0x000000000000011c, 0x000000000000011d) ".text._wasm_function_21"
                 [0x0000000000000000, 0x0000000000000032)
                 [0x0000000000000000, 0x0000000000000052) ".text._wasm_function_1"
                 [0x0000000000000000, 0x00000000000000cd) ".text._wasm_function_2"
                 [0x0000000000000000, 0x0000000000000041) ".text._wasm_function_3"
                 [0x0000000000000000, 0x0000000000000040) ".text._wasm_function_4"
                 [0x0000000000000000, 0x0000000000000034) ".text._wasm_function_5"
                 [0x0000000000000000, 0x0000000000000031) ".text._wasm_function_6"
... // pretty consistently, but then
                 [0x0000000000000000, 0x000000000000007a) ".text._wasm_function_179"
                 [0x000000000000008c, 0x000000000000027b) ".text._wasm_function_179"
                 [0x0000000000000000, 0x000000000000009c) ".text._wasm_function_180"
                 [0x000000000000009c, 0x0000000000000197) ".text._wasm_function_180"
                 [0x0000000000000000, 0x000000000000007c) ".text._wasm_function_181"
                 [0x0000000000000092, 0x0000000000000097) ".text._wasm_function_181"
                 [0x0000000000000000, 0x000000000000010f) ".text._wasm_function_182"
                 [0x000000000000010f, 0x0000000000000200) ".text._wasm_function_182"
                 [0x0000000000000000, 0x0000000000000057) ".text._wasm_function_183"
                 [0x0000000000000000, 0x00000000000000a4) ".text._wasm_function_184"
...

I am not really in the position to understand what the first column means (start address?) and why it is mostly zeros, but not always. I assume the second column is length. The first two lines look garbled, though. We could make this a test (after the wrinkles are ironed out), but which tools would generate DW_AT_ranges? Maybe rustc (which is LLVM-based).

Also, will the backend (cranelift) be confused by the DWARF-4 output of wasmtime containing DW_AT_ranges?

view this post on Zulip Wasmtime GitHub notifications bot (Apr 23 2020 at 16:07):

ggreif submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 23 2020 at 16:07):

ggreif created PR Review Comment:

I handle DebugAddrIndex in 4 places:

crates/debug/src/gc.rs:                } else if let read::AttributeValue::DebugAddrIndex(i) = low_pc {
crates/debug/src/transform/attr.rs:            AttributeValue::Addr(_) | AttributeValue::DebugAddrIndex(_)
crates/debug/src/transform/attr.rs:            AttributeValue::DebugAddrIndex(i) => {
crates/debug/src/transform/range_info_builder.rs:            } else if let Some(AttributeValue::DebugAddrIndex(i)) =

Relevant occurrences for DebugAddrBase

$ git grep -n DebugAddrBase
crates/debug/src/gc.rs:174:                    let a = dwarf.debug_addr.get_address(4, DebugAddrBase(8), i)?;
crates/debug/src/transform/attr.rs:85:                let u = context.debug_addr.get_address(4, DebugAddrBase(8), i)?;
crates/debug/src/transform/attr.rs:259:            AttributeValue::DebugAddrBase(offset) => {
crates/debug/src/transform/attr.rs:261:                    bail!("Unexpected (8) DebugAddrBase: {}", offset.0)
crates/debug/src/transform/mod.rs:43:    debug_addr_base: DebugAddrBase<R::Offset>,
crates/debug/src/transform/mod.rs:63:        debug_addr_base: DebugAddrBase(0),
crates/debug/src/transform/range_info_builder.rs:36:                context.debug_addr.get_address(4, DebugAddrBase(8), i)?

attr.rs:259 should probably be done earlier, and just ignored in attr.rs

Possibly passing it to debug_addr_base: in mod.rs:63.

I am also puzzled by the 0 vs. 8 thing. (clang-10 creates 8 when -gdwarf-5).

view this post on Zulip Wasmtime GitHub notifications bot (Apr 23 2020 at 16:11):

ggreif submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 23 2020 at 16:11):

ggreif created PR Review Comment:

One needs a DebugAddrBase in the CU, so that its DebugAddrIndexs can be resolved to Addrs. The module provides the .debug_addr section, which is shared between CUs.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 23 2020 at 16:15):

yurydelendik created PR Review Comment:

Right, that's what I would expect: ranges are sub-ranges of a single function. In object file first number will describe offset from the symbol start, so the above output somewhat expected. A gap in ".text._wasm_function_179" ranges may signify that there is some constant pool in the middle of the function ? The change code in question is what if a tool outputs CU with single range that covers all functions.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 23 2020 at 16:15):

yurydelendik submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 23 2020 at 16:16):

yurydelendik edited PR Review Comment.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 23 2020 at 16:16):

ggreif edited PR Review Comment.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 23 2020 at 16:22):

ggreif edited PR Review Comment.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 23 2020 at 16:24):

yurydelendik submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 23 2020 at 16:24):

yurydelendik created PR Review Comment:

I'm okay with removing it, only if there is a guarantee, at RangeInfoBuilder/AddressTransform level, that a range that covers multiple functions, by some tool, will not be wrongfully converted.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 23 2020 at 16:33):

yurydelendik created PR Review Comment:

The module provides the .debug_addr section, which is shared between CUs.

Correct. That what is why DebugAddrIndex needs CU's DebugAddrBase.

Can debug_addr_base be passed from the clone_unit?

view this post on Zulip Wasmtime GitHub notifications bot (Apr 23 2020 at 16:33):

yurydelendik submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 23 2020 at 16:36):

ggreif submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 23 2020 at 16:36):

ggreif created PR Review Comment:

Actually gimli already fills this in for us:

                    constants::DW_AT_addr_base => {
                        if let AttributeValue::DebugAddrBase(base) = attr.value() {
                            unit.addr_base = base;
                        }

we can access unit.addr_base (and should).

view this post on Zulip Wasmtime GitHub notifications bot (Apr 23 2020 at 16:37):

ggreif edited PR Review Comment.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 23 2020 at 17:36):

ggreif updated PR #1410 (assigned to yurydelendik) from master to master:

This is WIP, but please _feel free to have a look_ if you are interested in DWARF-5 support!

TODO:

Error: failed to run main module `fib-wasm-dwarf5.wasm`

Caused by:
    0: Debug information error
    1: Unexpected .debug_line_str
Process 30014 exited with status = 1 (0x00000001)

See #932.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Apr 23 2020 at 17:37):

ggreif submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 23 2020 at 17:37):

ggreif created PR Review Comment:

Commit cc1e974 ends the DebugAddrBase confusion. PTAL.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 23 2020 at 17:50):

ggreif submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 23 2020 at 17:50):

ggreif created PR Review Comment:

Just a remark, after commit cc1e974 now some dirt seems cleaned up, and I see:

0x0000000b: DW_TAG_compile_unit [1] *
              DW_AT_ranges [DW_FORM_sec_offset] (0x00000000
                 [0x0000000000000000, 0x0000000000000032)
                 [0x0000000000000000, 0x000000000000008c) ".text._wasm_function_1"
                 [0x0000000000000000, 0x00000000000000cd) ".text._wasm_function_2"
                 [0x0000000000000000, 0x000000000000008c) ".text._wasm_function_3"
                 [0x0000000000000000, 0x0000000000000168) ".text._wasm_function_4"
                 [0x0000000000000000, 0x0000000000000034) ".text._wasm_function_5"

the first row still makes me suspicious...

view this post on Zulip Wasmtime GitHub notifications bot (Apr 23 2020 at 18:53):

yurydelendik submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 23 2020 at 18:53):

yurydelendik created PR Review Comment:

Yeah, interesting to know where it is coming from. Maybe it is some memory addresses?

view this post on Zulip Wasmtime GitHub notifications bot (Apr 23 2020 at 20:45):

ggreif submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 23 2020 at 20:45):

ggreif created PR Review Comment:

It was the discrepancy between DebugAddrIndex(0), the initialised, wrong value, and DebugAddrIndex(8), the read, correct value. Now both are in sync.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 23 2020 at 20:57):

ggreif submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 23 2020 at 20:57):

ggreif created PR Review Comment:

It should be possible to find out by gripping for addrx and 0x00.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 23 2020 at 20:58):

ggreif edited PR Review Comment.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 23 2020 at 21:07):

ggreif edited PR Review Comment.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 23 2020 at 22:27):

ggreif updated PR #1410 (assigned to yurydelendik) from master to master:

This is WIP, but please _feel free to have a look_ if you are interested in DWARF-5 support!

TODO:

Error: failed to run main module `fib-wasm-dwarf5.wasm`

Caused by:
    0: Debug information error
    1: Unexpected .debug_line_str
Process 30014 exited with status = 1 (0x00000001)

See #932.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Apr 24 2020 at 15:17):

ggreif updated PR #1410 (assigned to yurydelendik) from master to master:

This is WIP, but please _feel free to have a look_ if you are interested in DWARF-5 support!

TODO:

Error: failed to run main module `fib-wasm-dwarf5.wasm`

Caused by:
    0: Debug information error
    1: Unexpected .debug_line_str
Process 30014 exited with status = 1 (0x00000001)

See #932.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Apr 24 2020 at 17:12):

ggreif submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 24 2020 at 17:12):

ggreif created PR Review Comment:

return failure?

view this post on Zulip Wasmtime GitHub notifications bot (Apr 24 2020 at 17:24):

yurydelendik submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 24 2020 at 17:24):

yurydelendik created PR Review Comment:

Can we just ignore it? I was under impression this attribute only present for CU.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 24 2020 at 17:44):

ggreif updated PR #1410 (assigned to yurydelendik) from master to master:

This is WIP, but please _feel free to have a look_ if you are interested in DWARF-5 support!

TODO:

Error: failed to run main module `fib-wasm-dwarf5.wasm`

Caused by:
    0: Debug information error
    1: Unexpected .debug_line_str
Process 30014 exited with status = 1 (0x00000001)

See #932.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Apr 24 2020 at 17:50):

ggreif submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 24 2020 at 17:50):

ggreif created PR Review Comment:

Yes, we ignore it, thus the continue, but we also want to check if it is correctly extracted by gimli already.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 24 2020 at 17:51):

ggreif updated PR #1410 (assigned to yurydelendik) from master to master:

This is WIP, but please _feel free to have a look_ if you are interested in DWARF-5 support!

TODO:

Error: failed to run main module `fib-wasm-dwarf5.wasm`

Caused by:
    0: Debug information error
    1: Unexpected .debug_line_str
Process 30014 exited with status = 1 (0x00000001)

See #932.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Apr 24 2020 at 18:28):

ggreif updated PR #1410 (assigned to yurydelendik) from master to master:

This is WIP, but please _feel free to have a look_ if you are interested in DWARF-5 support!

TODO:

Error: failed to run main module `fib-wasm-dwarf5.wasm`

Caused by:
    0: Debug information error
    1: Unexpected .debug_line_str
Process 30014 exited with status = 1 (0x00000001)

See #932.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Apr 24 2020 at 18:31):

ggreif updated PR #1410 (assigned to yurydelendik) from master to master:

This is WIP, but please _feel free to have a look_ if you are interested in DWARF-5 support!

TODO:

Error: failed to run main module `fib-wasm-dwarf5.wasm`

Caused by:
    0: Debug information error
    1: Unexpected .debug_line_str
Process 30014 exited with status = 1 (0x00000001)

See #932.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Apr 24 2020 at 18:36):

ggreif submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 24 2020 at 18:36):

ggreif created PR Review Comment:

Done in 2e0b30a.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 25 2020 at 15:18):

ggreif created PR Review Comment:

I looked into the RangeInfoBuilder::build() code. It seems to straightforwardly map each range through the address translator. Then it writes the result obtaining an ID and passes that on. In the DWARF-4 output there is a .debug_range section, which seems legit. Since this is internally consumed by wasmtime, I don't see a lot of risk. When using wasm2obj, it remains to see whether downstream toolchains are happy with this. But I think this use case would be an extreme minority, especially when it comes to DWARF debugging. Even then it should be a matter of a few lines of code to detect that we are outputting DWARF-4 and in this case just emit a (DW_AT_low_pc, DW_AT_high_pc) pair.
Unfortunately I cannot offer other guarantees besides my offer to fix things in case some tool breaks because of this. What do you think?

view this post on Zulip Wasmtime GitHub notifications bot (Apr 25 2020 at 15:18):

ggreif submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 25 2020 at 15:24):

ggreif requested yurydelendik for a review on PR #1410.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 25 2020 at 15:25):

ggreif edited PR #1410 (assigned to yurydelendik) from master to master:

This is WIP, but please _feel free to have a look_ if you are interested in DWARF-5 support!

TODO:

Error: failed to run main module `fib-wasm-dwarf5.wasm`

Caused by:
    0: Debug information error
    1: Unexpected .debug_line_str
Process 30014 exited with status = 1 (0x00000001)

See #932.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Apr 25 2020 at 15:25):

ggreif edited PR #1410 (assigned to yurydelendik) from master to master:

This is WIP, but please _feel free to have a look_ if you are interested in DWARF-5 support!

TODO:

Error: failed to run main module `fib-wasm-dwarf5.wasm`

Caused by:
    0: Debug information error
    1: Unexpected .debug_line_str
Process 30014 exited with status = 1 (0x00000001)

See #932.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Apr 25 2020 at 15:27):

ggreif edited PR #1410 (assigned to yurydelendik) from master to master:

This is WIP, but please _feel free to have a look_ if you are interested in DWARF-5 support!

TODO:

Error: failed to run main module `fib-wasm-dwarf5.wasm`

Caused by:
    0: Debug information error
    1: Unexpected .debug_line_str
Process 30014 exited with status = 1 (0x00000001)

See #932.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Apr 25 2020 at 15:28):

ggreif edited PR #1410 (assigned to yurydelendik) from master to master:

This is WIP, but please _feel free to have a look_ if you are interested in DWARF-5 support!

TODO:

Error: failed to run main module `fib-wasm-dwarf5.wasm`

Caused by:
    0: Debug information error
    1: Unexpected .debug_line_str
Process 30014 exited with status = 1 (0x00000001)

See #932.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Apr 25 2020 at 15:29):

ggreif edited PR #1410 (assigned to yurydelendik) from master to master:

See #932.

TODO:

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Apr 25 2020 at 15:34):

ggreif edited PR #1410 (assigned to yurydelendik) from master to master:

See #932.

TODO:

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Apr 25 2020 at 15:35):

ggreif edited PR #1410 (assigned to yurydelendik) from master to master:

See #932.

TODO:

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Apr 25 2020 at 15:39):

ggreif edited PR #1410 (assigned to yurydelendik) from master to master:

See #932.

TODO:

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Apr 25 2020 at 18:11):

ggreif updated PR #1410 (assigned to yurydelendik) from master to master:

See #932.

TODO:

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Apr 25 2020 at 22:24):

ggreif edited PR #1410 (assigned to yurydelendik) from master to master:

See #932.

TODO:

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Apr 27 2020 at 16:05):

yurydelendik updated PR #1410 (assigned to yurydelendik) from master to master:

See #932.

TODO:

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Apr 27 2020 at 17:45):

yurydelendik updated PR #1410 (assigned to yurydelendik) from master to master:

See #932.

TODO:

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Apr 27 2020 at 18:07):

yurydelendik submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 27 2020 at 18:07):

yurydelendik created PR Review Comment:

It seems to straightforwardly map each range through the address translator.

Correct. Concern about what if the range spans all functions (not per functions), e.g. CU range is 0..100 but individual functions are 0..20, 0..50, etc.

Let's change the else if, but keep the comment.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 27 2020 at 18:07):

yurydelendik edited PR Review Comment.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 27 2020 at 18:22):

yurydelendik submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 27 2020 at 18:22):

yurydelendik submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 27 2020 at 18:22):

yurydelendik created PR Review Comment:

Let's just silently ignore DebugAddrBase or DebugStrOffsetsBase on DIEs regardless their values. Standard is saying we shall not expect them there. Other tools will probably will do the same.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 27 2020 at 18:22):

yurydelendik created PR Review Comment:

rn index_base => file_index_base (here and above)

view this post on Zulip Wasmtime GitHub notifications bot (Apr 27 2020 at 19:40):

ggreif updated PR #1410 (assigned to yurydelendik) from master to master:

See #932.

TODO:

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Apr 27 2020 at 19:42):

ggreif updated PR #1410 (assigned to yurydelendik) from master to master:

See #932.

TODO:

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Apr 27 2020 at 21:44):

yurydelendik updated PR #1410 (assigned to yurydelendik) from master to master:

See #932.

TODO:

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Apr 27 2020 at 22:27):

yurydelendik merged PR #1410.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 27 2020 at 22:28):

yurydelendik edited PR #1410 (assigned to yurydelendik) from master to master:

See #932.

TODO:

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->


Last updated: Dec 23 2024 at 13:07 UTC