github.com/tinygo-org/tinygo@v0.31.3-0.20240404173401-90b0bf646c27/src/runtime/debug/debug.go (about)

     1  // Package debug is a dummy package that is not yet implemented.
     2  package debug
     3  
     4  // SetMaxStack sets the maximum amount of memory that can be used by a single
     5  // goroutine stack.
     6  //
     7  // Not implemented.
     8  func SetMaxStack(n int) int {
     9  	return n
    10  }
    11  
    12  // PrintStack prints to standard error the stack trace returned by runtime.Stack.
    13  //
    14  // Not implemented.
    15  func PrintStack() {}
    16  
    17  // Stack returns a formatted stack trace of the goroutine that calls it.
    18  //
    19  // Not implemented.
    20  func Stack() []byte {
    21  	return nil
    22  }
    23  
    24  // ReadBuildInfo returns the build information embedded
    25  // in the running binary. The information is available only
    26  // in binaries built with module support.
    27  //
    28  // Not implemented.
    29  func ReadBuildInfo() (info *BuildInfo, ok bool) {
    30  	return nil, false
    31  }
    32  
    33  // BuildInfo represents the build information read from
    34  // the running binary.
    35  type BuildInfo struct {
    36  	Path     string    // The main package path
    37  	Main     Module    // The module containing the main package
    38  	Deps     []*Module // Module dependencies
    39  	Settings []BuildSetting
    40  }
    41  
    42  type BuildSetting struct {
    43  	// Key and Value describe the build setting.
    44  	// Key must not contain an equals sign, space, tab, or newline.
    45  	// Value must not contain newlines ('\n').
    46  	Key, Value string
    47  }
    48  
    49  // Module represents a module.
    50  type Module struct {
    51  	Path    string  // module path
    52  	Version string  // module version
    53  	Sum     string  // checksum
    54  	Replace *Module // replaced by this module
    55  }
    56  
    57  // Not implemented.
    58  func SetGCPercent(n int) int {
    59  	return n
    60  }