diff --git a/cmd/dlv/dlv_test.go b/cmd/dlv/dlv_test.go index a8831497..1533906d 100644 --- a/cmd/dlv/dlv_test.go +++ b/cmd/dlv/dlv_test.go @@ -810,7 +810,7 @@ func TestRemoteDAPClientMulti(t *testing.T) { dapclient2.ExpectTerminatedEvent(t) closeDAPRemoteMultiClient(t, dapclient2, "exited") - // Attach to exited processs is an error + // Attach to exited processes is an error dapclient3 := daptest.NewClient(listenAddr) dapclient3.AttachRequest(map[string]interface{}{"mode": "remote", "stopOnEntry": true}) dapclient3.ExpectErrorResponseWith(t, dap.FailedToAttach, `Process \d+ has exited with status 0`, true) diff --git a/pkg/dwarf/godwarf/tree.go b/pkg/dwarf/godwarf/tree.go index 64cb84d5..e36c3a99 100644 --- a/pkg/dwarf/godwarf/tree.go +++ b/pkg/dwarf/godwarf/tree.go @@ -194,7 +194,7 @@ func max(a, b uint64) uint64 { // fuseRanges fuses rngs2 into rngs1, it's the equivalent of // normalizeRanges(append(rngs1, rngs2)) -// but more efficent. +// but more efficient. func fuseRanges(rngs1, rngs2 [][2]uint64) [][2]uint64 { if rangesContains(rngs1, rngs2) { return rngs1 diff --git a/pkg/proc/bininfo.go b/pkg/proc/bininfo.go index 8b77e474..736a8dc6 100644 --- a/pkg/proc/bininfo.go +++ b/pkg/proc/bininfo.go @@ -191,7 +191,7 @@ func FindFileLocation(p Process, filename string, lineno int) ([]uint64, error) return nil, &ErrCouldNotFindLine{fileFound, filename, lineno} } - // 2. assign all occurences of filename:lineno to their containing function + // 2. assign all occurrences of filename:lineno to their containing function pcByFunc := map[*Function][]line.PCStmt{} sort.Slice(pcs, func(i, j int) bool { return pcs[i].PC < pcs[j].PC }) diff --git a/pkg/proc/dump.go b/pkg/proc/dump.go index 3989dc00..ee693d61 100644 --- a/pkg/proc/dump.go +++ b/pkg/proc/dump.go @@ -36,7 +36,7 @@ type DumpState struct { type DumpFlags uint16 const ( - DumpPlatformIndependent DumpFlags = 1 << iota // always use platfrom-independent notes format + DumpPlatformIndependent DumpFlags = 1 << iota // always use platform-independent notes format ) // MemoryMapEntry represent a memory mapping in the target process. diff --git a/pkg/proc/fncall.go b/pkg/proc/fncall.go index 9a9ddc50..8a88d25b 100644 --- a/pkg/proc/fncall.go +++ b/pkg/proc/fncall.go @@ -270,7 +270,7 @@ func evalFunctionCall(scope *EvalScope, node *ast.CallExpr) (*Variable, error) { if thread == nil { // We are doing a nested function call and using Go 1.15, the original // injection goroutine was suspended and now we are using a different - // goroutine, evaluation still happend on the original goroutine but we + // goroutine, evaluation still happened on the original goroutine but we // need to use a different thread to do the nested call injection. thread = scope.callCtx.injectionThread g2, err := GetG(thread) diff --git a/pkg/proc/native/threads_darwin.c b/pkg/proc/native/threads_darwin.c index 2b48f8dc..3886cd3b 100644 --- a/pkg/proc/native/threads_darwin.c +++ b/pkg/proc/native/threads_darwin.c @@ -14,7 +14,7 @@ write_memory(task_t task, mach_vm_address_t addr, void *d, mach_msg_type_number_ kret = mach_vm_region((vm_map_t)task, &(mach_vm_address_t){addr}, (mach_vm_size_t*)&l, VM_REGION_BASIC_INFO_64, (vm_region_info_t)&info, &count, &objname); if (kret != KERN_SUCCESS) return -1; - // Set permissions to enable writting to this memory location + // Set permissions to enable writing to this memory location kret = mach_vm_protect(task, addr, len, FALSE, VM_PROT_WRITE|VM_PROT_COPY|VM_PROT_READ); if (kret != KERN_SUCCESS) return -1; diff --git a/pkg/proc/proc_test.go b/pkg/proc/proc_test.go index eca72ab2..27b9f6d3 100644 --- a/pkg/proc/proc_test.go +++ b/pkg/proc/proc_test.go @@ -352,7 +352,7 @@ func TestBreakpointWithNonExistantFunction(t *testing.T) { withTestProcess("testprog", t, func(p *proc.Target, fixture protest.Fixture) { _, err := p.SetBreakpoint(0, 0, proc.UserBreakpoint, nil) if err == nil { - t.Fatal("Should not be able to break at non existant function") + t.Fatal("Should not be able to break at non existent function") } }) } @@ -4289,7 +4289,7 @@ func TestReadDeferArgs(t *testing.T) { // the autogenerated code used to unpack the argument frame stored in // runtime._defer into registers. // We either need to know how to do the translation, implementing the ABI1 - // rules in Delve, or have some assistence from the compiler (for example + // rules in Delve, or have some assistance from the compiler (for example // have the dwrap function contain entries for each of the captured // variables with a location describing their offset from DX). // Ultimately this feature is unimportant enough that we can leave it diff --git a/pkg/proc/target.go b/pkg/proc/target.go index 086c5d00..3c317d48 100644 --- a/pkg/proc/target.go +++ b/pkg/proc/target.go @@ -483,7 +483,7 @@ func (t *Target) RequestManualStop() error { const ( FakeAddressBase = 0xbeef000000000000 - fakeAddressUnresolv = 0xbeed000000000000 // this address never resloves to memory + fakeAddressUnresolv = 0xbeed000000000000 // this address never resolves to memory ) // newCompositeMemory creates a new compositeMemory object and registers it. diff --git a/pkg/proc/variables.go b/pkg/proc/variables.go index 0f794da4..9e1dc2a6 100644 --- a/pkg/proc/variables.go +++ b/pkg/proc/variables.go @@ -76,7 +76,7 @@ const ( VariableReturnArgument // VariableFakeAddress means the address of this variable is either fake // (i.e. the variable is partially or completely stored in a CPU register - // and doesn't have a real address) or possibly no longer availabe (because + // and doesn't have a real address) or possibly no longer available (because // the variable is the return value of a function call and allocated on a // frame that no longer exists) VariableFakeAddress diff --git a/pkg/terminal/command_test.go b/pkg/terminal/command_test.go index 9a37a2a8..39d8ff52 100644 --- a/pkg/terminal/command_test.go +++ b/pkg/terminal/command_test.go @@ -155,7 +155,7 @@ func withTestTerminalBuildFlags(name string, t testing.TB, buildFlags test.Build func TestCommandDefault(t *testing.T) { var ( cmds = Commands{} - cmd = cmds.Find("non-existant-command", noPrefix).cmdFn + cmd = cmds.Find("non-existent-command", noPrefix).cmdFn ) err := cmd(nil, callContext{}, "") diff --git a/service/api/prettyprint.go b/service/api/prettyprint.go index 02b3ff50..903f355c 100644 --- a/service/api/prettyprint.go +++ b/service/api/prettyprint.go @@ -429,7 +429,7 @@ func PrettyExamineMemory(address uintptr, memArea []byte, isLittleEndian bool, f addrFmt string ) - // Diffrent versions of golang output differently about '#'. + // Different versions of golang output differently about '#'. // See https://ci.appveyor.com/project/derekparker/delve-facy3/builds/30179356. switch format { case 'b': diff --git a/service/api/types.go b/service/api/types.go index a9def948..5187ebdd 100644 --- a/service/api/types.go +++ b/service/api/types.go @@ -277,7 +277,7 @@ const ( // VariableFakeAddress means the address of this variable is either fake // (i.e. the variable is partially or completely stored in a CPU register - // and doesn't have a real address) or possibly no longer availabe (because + // and doesn't have a real address) or possibly no longer available (because // the variable is the return value of a function call and allocated on a // frame that no longer exists) VariableFakeAddress diff --git a/service/dap/server.go b/service/dap/server.go index 8a06f7be..37dd9671 100644 --- a/service/dap/server.go +++ b/service/dap/server.go @@ -145,7 +145,7 @@ type Session struct { // to ensure that messages do not get interleaved sendingMu sync.Mutex - // runningCmd tracks whether the server is running an asyncronous + // runningCmd tracks whether the server is running an asynchronous // command that resumes execution, which may not correspond to the actual // running state of the process (e.g. if a command is temporarily interrupted). runningCmd bool @@ -251,9 +251,9 @@ type dapClientCapabilites struct { } // DefaultLoadConfig controls how variables are loaded from the target's memory. -// These limits are conservative to minimize performace overhead for bulk loading. +// These limits are conservative to minimize performance overhead for bulk loading. // With dlv-dap, users do not have a way to adjust these. -// Instead we are focusing in interacive loading with nested reloads, array/map +// Instead we are focusing in interactive loading with nested reloads, array/map // paging and context-specific string limits. var DefaultLoadConfig = proc.LoadConfig{ FollowPointers: true, @@ -1547,7 +1547,7 @@ func closeIfOpen(ch chan struct{}) { // onConfigurationDoneRequest handles 'configurationDone' request. // This is an optional request enabled by capability ‘supportsConfigurationDoneRequest’. -// It gets triggered after all the debug requests that follow initalized event, +// It gets triggered after all the debug requests that follow initialized event, // so the s.debugger is guaranteed to be set. Expects the target to be halted. func (s *Session) onConfigurationDoneRequest(request *dap.ConfigurationDoneRequest, allowNextStateChange chan struct{}) { defer closeIfOpen(allowNextStateChange) @@ -2203,7 +2203,7 @@ func (s *Session) childrenToDAPVariables(v *fullyQualifiedVariable) ([]dap.Varia keyType := s.getTypeIfSupported(keyv) valType := s.getTypeIfSupported(valv) // If key or value or both are scalars, we can use - // a single variable to represet key:value format. + // a single variable to represent key:value format. // Otherwise, we must return separate variables for both. if keyref > 0 && valref > 0 { // Both are not scalars keyvar := dap.Variable{ @@ -2585,7 +2585,7 @@ func (s *Session) convertVariableWithOpts(v *proc.Variable, qualifiedNameOrExpr // Support the following expressions: // -- {expression} - evaluates the expression and returns the result as a variable // -- call {function} - injects a function call and returns the result as a variable -// -- config {expression} - updates configuration paramaters +// -- config {expression} - updates configuration parameters // TODO(polina): users have complained about having to click to expand multi-level // variables, so consider also adding the following: // -- print {expression} - return the result as a string like from dlv cli