Enables debug info (a.k.a. DWARF) by default (#924)
This makes DWARF enabled by default, with an opt-out flag. This didn't need to be experimental as the feature was requested for a long time and there's no API impact to using it. Signed-off-by: Adrian Cole <adrian@tetrate.io>
This commit is contained in:
@@ -138,6 +138,7 @@ func NewRuntimeWithConfig(ctx context.Context, rConfig RuntimeConfig) Runtime {
|
||||
memoryLimitPages: config.memoryLimitPages,
|
||||
memoryCapacityFromMax: config.memoryCapacityFromMax,
|
||||
isInterpreter: config.isInterpreter,
|
||||
dwarfDisabled: config.dwarfDisabled,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -149,6 +150,7 @@ type runtime struct {
|
||||
memoryLimitPages uint32
|
||||
memoryCapacityFromMax bool
|
||||
isInterpreter bool
|
||||
dwarfDisabled bool
|
||||
compiledModules []*compiledModule
|
||||
}
|
||||
|
||||
@@ -172,9 +174,8 @@ func (r *runtime) CompileModule(ctx context.Context, binary []byte) (CompiledMod
|
||||
return nil, errors.New("invalid binary")
|
||||
}
|
||||
|
||||
dwarfEnabled := experimentalapi.DWARFBasedStackTraceEnabled(ctx)
|
||||
internal, err := binaryformat.DecodeModule(binary, r.enabledFeatures,
|
||||
r.memoryLimitPages, r.memoryCapacityFromMax, dwarfEnabled, false)
|
||||
r.memoryLimitPages, r.memoryCapacityFromMax, !r.dwarfDisabled, false)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
} else if err = internal.Validate(r.enabledFeatures); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user