*: fix some typos
Signed-off-by: cuishuang <imcusg@gmail.com>
This commit is contained in:
parent
cdf73b5365
commit
9a9c1a9f33
@ -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)
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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 })
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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{}, "")
|
||||
|
||||
@ -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':
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user