Skip to content

Incorrect Line Numbers When Parsing .debug_line with gimli #4939

Open
@hapeeeeee

Description

@hapeeeeee

I attempted to use the gimli library to parse the .debug_line section of a WebAssembly (Wasm) file that includes debug information. The Wasm file was written in Motoko and compiled using moc. However, gimli produced incorrect line numbers during parsing.

My implementation is nearly identical to the example provided in the gimli library, yet it still fails to retrieve the correct line numbers. To further investigate, I tested my implementation on Wasm files compiled with cargo, and the results were entirely correct.

Image

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions