wasmdebug

package
v1.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 18, 2026 License: Apache-2.0 Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package wasmdebug implements the WebAssembly tool-conventions packaging for embedded and external DWARF custom sections.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildID

func BuildID(module []byte) ([]byte, bool, error)

BuildID returns the unique WebAssembly tool-conventions build_id, if present. Build IDs are arbitrary bytes and are not interpreted as UTF-8.

func DWARFSections

func DWARFSections(module []byte) (map[string][]byte, error)

DWARFSections returns the unique embedded DWARF custom sections keyed by their standard section names. Returned contents do not alias module.

func DebuggerRecord

func DebuggerRecord(module []byte) (debugabi.Record, bool, error)

DebuggerRecord returns the unique LLGo debugger ABI record, if present.

func EnsureBuildID

func EnsureBuildID(module []byte) ([]byte, []byte, error)

EnsureBuildID preserves an existing valid build ID or installs a deterministic SHA-256 ID over the complete module without a build_id section. Calling it before externalization gives the main module and DWARF sidecar the same identity for stale-sidecar checks.

func ExternalURL

func ExternalURL(module []byte) (string, bool, error)

ExternalURL returns the external_debug_info URL, if present.

func Externalize

func Externalize(module []byte, url string) ([]byte, error)

Externalize removes embedded DWARF custom sections and appends the standard external_debug_info URL record. The original module is suitable for use as the sidecar because the convention permits it to retain code and data.

func HasDWARF

func HasDWARF(module []byte) (bool, error)

HasDWARF reports whether module contains at least one DWARF custom section.

func RefreshBuildID

func RefreshBuildID(module []byte) ([]byte, []byte, error)

RefreshBuildID computes a content identity after debugger metadata is added. It validates an existing ID, then hashes every section except build_id so repeated packaging is deterministic and ABI edits invalidate old sidecars. Call it before externalization to give both artifacts the same identity.

func SetBuildID

func SetBuildID(module, id []byte) ([]byte, error)

SetBuildID replaces the WebAssembly tool-conventions build_id section.

func SetDebuggerRecord

func SetDebuggerRecord(module []byte, record debugabi.Record) ([]byte, error)

SetDebuggerRecord replaces the LLGo debugger ABI custom section with the canonical encoding of record. Other custom and standard sections retain their original bytes and order.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL