提交 1d3b41f6 编写于 作者: J Josh Soref 提交者: Alessandro Arzilli

all: Spelling

上级 2ba27af6
......@@ -71,7 +71,7 @@ All changes mention the author, unless contributed by me (@derekparker).
- Store the correct concrete value for interface variables (previously we would always have a pointer type, even when the concrete value was not a pointer) (@aarzilli)
- Fix interface and slice equality with nil (@aarzilli)
- Fix file:line location specs when relative paths are in .debug_line (@hyangah)
- Fix behavior of next/step/stepout in several edge-cases (invalid return addresses, no courrent goroutine, after process exists, inside unknown code, inside assembly files) (@aarzilli)
- Fix behavior of next/step/stepout in several edge-cases (invalid return addresses, no current goroutine, after process exists, inside unknown code, inside assembly files) (@aarzilli)
- Make sure the debugged executable we generated is deleted after exit (@alexbrainman)
- Make sure rr trace directories are deleted when we delete the executable and after tests (@aarzilli)
- Return errors for commands sent after the target process exited instead of panicing (@derekparker)
......@@ -135,7 +135,7 @@ All changes mention the author, unless contributed by me (@derekparker).
### Changed
- Optimized 'trace' functionality (@aarzilli)
- Internal refactoring to support mutliple backends, core dumps, and more (@aarzilli) [Still ongoing]
- Internal refactoring to support multiple backends, core dumps, and more (@aarzilli) [Still ongoing]
- Improve stacktraces (@aarzilli)
- Improved documentation for passing flags to debugged process (@njason)
......@@ -167,7 +167,7 @@ All changes mention the author, unless contributed by me (@derekparker).
- Pretty printing: type of elements of interface slices are printed.
- Improvements in internal operation of "step" command.
- Allow quouting in build flags argument.
- Allow quoting in build flags argument.
- "h" as alias for "help" command. (@stmuk)
### Fixed
......@@ -292,7 +292,7 @@ All changes mention the author, unless contributed by me (@derekparker).
- Deprecate 'run' subcommand in favor of 'debug'. The 'run' subcommand now simply prints a warning, instructing the user to use the 'debug' command instead.
- All 'info' subcommands have been promoted to the top level. You can now simply run 'funcs', or 'sources' instead of 'info funcs', etc...
- Any command taking a location expression (i.e. break/trace/list) now support an updated linespec implementation. This allows you to describe the location you would like a breakpoint (etc..) set at in a more convienant way (@aarzilli).
- Any command taking a location expression (i.e. break/trace/list) now support an updated linespec implementation. This allows you to describe the location you would like a breakpoint (etc..) set at in a more convenient way (@aarzilli).
### Fixed
......
......@@ -122,10 +122,10 @@ Saves the configuration file to disk, overwriting the current configuration file
Changes the value of a configuration parameter.
config subistitute-path <from> <to>
config subistitute-path <from>
config substitute-path <from> <to>
config substitute-path <from>
Adds or removes a path subistitution rule.
Adds or removes a path substitution rule.
config alias <command> <alias>
config alias <alias>
......
......@@ -34,7 +34,7 @@ check-cert:
ifneq "$(TRAVIS)" "true"
ifdef DARWIN
ifeq "$(CERT)" ""
scripts/gencert.sh || (echo "An error occurred when generating and installing a new certicate"; exit 1)
scripts/gencert.sh || (echo "An error occurred when generating and installing a new certificate"; exit 1)
CERT = dlv-cert
endif
endif
......
......@@ -21,6 +21,6 @@ func main() {
if len(os.Args) < 2 || os.Args[1] != "panic" {
runtime.Breakpoint()
} else {
panic("booom!")
panic("boom!")
}
}
......@@ -55,7 +55,7 @@ func (b Blacklist) String() (result string) {
return result
}
// ToBool converts a string ("true" or "false") to it's boolean equivalent
// ToBool converts a string ("true" or "false") to its boolean equivalent
func ToBool(s string) (b bool) {
if len(s) == 0 {
log.Fatal("ERROR: variable empty, cannot convert to boolean")
......
......@@ -154,7 +154,7 @@ func (frame *FrameContext) ExecuteUntilPC(instructions []byte) {
frame.buf.Write(instructions)
// We only need to execute the instructions until
// ctx.loc > ctx.addess (which is the address we
// ctx.loc > ctx.address (which is the address we
// are currently at in the traced process).
for frame.address >= frame.loc && frame.buf.Len() > 0 {
executeDwarfInstruction(frame)
......
......@@ -75,7 +75,7 @@ func testDebugLinePrologueParser(p string, t *testing.T) {
}
if prologue.MinInstrLength != uint8(1) {
t.Fatal("Minimun Instruction Length not parsed correctly", prologue.MinInstrLength)
t.Fatal("Minimum Instruction Length not parsed correctly", prologue.MinInstrLength)
}
if prologue.InitialIsStmt != uint8(1) {
......
......@@ -25,7 +25,7 @@ type context struct {
DwarfRegisters
}
// Piece is a piece of memory stored either at an addres or in a register.
// Piece is a piece of memory stored either at an address or in a register.
type Piece struct {
Size int
Addr int64
......
......@@ -257,7 +257,7 @@ func (reader *Reader) InstructionsForEntry(entry *dwarf.Entry) ([]byte, error) {
return append([]byte{}, instructions...), nil
}
// NextMememberVariable moves the reader to the next debug entry that describes a member variable and returns the entry.
// NextMemberVariable moves the reader to the next debug entry that describes a member variable and returns the entry.
func (reader *Reader) NextMemberVariable() (*dwarf.Entry, error) {
for entry, err := reader.Next(); entry != nil; entry, err = reader.Next() {
if err != nil {
......
......@@ -22,7 +22,7 @@ var (
GoVer18Beta = GoVersion{1, 8, -1, 0, 0, ""}
)
// Parse parses a go verison string
// Parse parses a go version string
func Parse(ver string) (GoVersion, bool) {
var r GoVersion
var err1, err2, err3 error
......@@ -135,7 +135,7 @@ func (v *GoVersion) IsDevel() bool {
const goVersionPrefix = "go version "
// Installed runs "go verison" and parses the output
// Installed runs "go version" and parses the output
func Installed() (GoVersion, bool) {
out, err := exec.Command("go", "version").CombinedOutput()
if err != nil {
......
......@@ -23,7 +23,7 @@ const defaultCFA = 0xc420051d00
func fakeBinaryInfo(t *testing.T, dwb *dwarfbuilder.Builder) *proc.BinaryInfo {
abbrev, aranges, frame, info, line, pubnames, ranges, str, loc, err := dwb.Build()
assertNoError(err, t, "dwarbuilder.Build")
assertNoError(err, t, "dwarfbuilder.Build")
dwdata, err := dwarf.New(abbrev, aranges, frame, info, line, pubnames, ranges, str)
assertNoError(err, t, "creating dwarf")
......
......@@ -1003,7 +1003,7 @@ func (scope *EvalScope) evalBinary(node *ast.BinaryExpr) (*Variable, error) {
}
}
// Comapres xv to yv using operator op
// Compares xv to yv using operator op
// Both xv and yv must be loaded and have a compatible type (as determined by negotiateType)
func compareOp(op token.Token, xv *Variable, yv *Variable) (bool, error) {
switch xv.Kind {
......@@ -1060,7 +1060,7 @@ func compareOp(op token.Token, xv *Variable, yv *Variable) (bool, error) {
return false, nil
}
if int64(len(xv.Children)) != xv.Len || int64(len(yv.Children)) != yv.Len {
return false, fmt.Errorf("sturcture too deep for comparison")
return false, fmt.Errorf("structure too deep for comparison")
}
eql, err = equalChildren(xv, yv, false)
case reflect.Slice, reflect.Map, reflect.Func, reflect.Chan:
......
......@@ -54,7 +54,7 @@
// event is reported, if any other event happens "simultaneously" they are
// suppressed by the stub and the debugger can query for them using
// qThreadStopInfo. This is much easier for us to implement and the
// implementation gracefully degrates to the case where qThreadStopInfo is
// implementation gracefully degrades to the case where qThreadStopInfo is
// unavailable but the inferior is run in single threaded mode.
//
// Therefore the following code will assume lldb-server-like behavior.
......
......@@ -1148,7 +1148,7 @@ func wiredecode(in, buf []byte) (newbuf, msg []byte) {
}
case '#': // end of packet
return buf, buf[start:]
case '*': // runlenght encoding marker
case '*': // runlength encoding marker
if i+1 >= len(in) || i == 0 {
buf = append(buf, ch)
} else {
......
......@@ -252,7 +252,7 @@ func (dbp *Process) ContinueOnce() (proc.Thread, error) {
// StepInstruction will continue the current thread for exactly
// one instruction. This method affects only the thread
// asssociated with the selected goroutine. All other
// associated with the selected goroutine. All other
// threads will remain stopped.
func (dbp *Process) StepInstruction() (err error) {
thread := dbp.currentThread
......
......@@ -27,7 +27,7 @@ func (pe ProcessExitedError) Error() string {
}
// FindFileLocation returns the PC for a given file:line.
// Assumes that `file` is normailzed to lower case and '/' on Windows.
// Assumes that `file` is normalized to lower case and '/' on Windows.
func FindFileLocation(p Process, fileName string, lineno int) (uint64, error) {
pc, fn, err := p.BinInfo().LineToPC(fileName, lineno)
if err != nil {
......
......@@ -279,7 +279,7 @@ func TestBreakpoint(t *testing.T) {
})
}
func TestBreakpointInSeperateGoRoutine(t *testing.T) {
func TestBreakpointInSeparateGoRoutine(t *testing.T) {
protest.AllowRecording(t)
withTestProcess("testthreads", t, func(p proc.Process, fixture protest.Fixture) {
fnentry, err := proc.FindFunctionLocation(p, "main.anotherthread", false, 0)
......
......@@ -36,7 +36,7 @@ func TestScopeWithEscapedVariable(t *testing.T) {
}
if avar.Flags&proc.VariableEscaped == 0 {
t.Errorf("variale a isn't escaped to the heap")
t.Errorf("variable a isn't escaped to the heap")
}
})
}
......
......@@ -10,7 +10,7 @@ import (
"github.com/derekparker/delve/pkg/dwarf/op"
)
// This code is partly adaped from runtime.gentraceback in
// This code is partly adapted from runtime.gentraceback in
// $GOROOT/src/runtime/traceback.go
// Stackframe represents a frame in a system stack.
......@@ -27,7 +27,7 @@ type Stackframe struct {
Ret uint64
// Address to the memory location containing the return address
addrret uint64
// Err is set if an error occoured during stacktrace
// Err is set if an error occurred during stacktrace
Err error
// SystemStack is true if this frame belongs to a system stack.
SystemStack bool
......
......@@ -425,7 +425,7 @@ func onRuntimeBreakpoint(thread Thread) bool {
return loc.Fn != nil && loc.Fn.Name == "runtime.breakpoint"
}
// onNextGorutine returns true if this thread is on the goroutine requested by the current 'next' command
// onNextGoroutine returns true if this thread is on the goroutine requested by the current 'next' command
func onNextGoroutine(thread Thread, breakpoints *BreakpointMap) (bool, error) {
var bp *Breakpoint
for i := range breakpoints.M {
......
......@@ -694,7 +694,7 @@ func nameOfStructRuntimeType(_type *Variable, kind, tflag int64) (string, error)
case "offsetAnon":
// The offsetAnon field of runtime.structfield combines the offset of
// the struct field from the base address of the struct with a flag
// determining whether the field is anonimous (i.e. an embedded struct).
// determining whether the field is anonymous (i.e. an embedded struct).
//
// offsetAnon = (offset<<1) | (anonFlag)
//
......@@ -789,7 +789,7 @@ func typeForKind(kind int64, bi *BinaryInfo) (*godwarf.StructType, error) {
return constructTypeForKind(kind, bi)
}
// constructTypeForKind synthesizes a *dwarf.StrucType for the specified kind.
// constructTypeForKind synthesizes a *dwarf.StructType for the specified kind.
// This is necessary because on go1.8 and previous the specialized types of
// runtime._type were not exported.
func constructTypeForKind(kind int64, bi *BinaryInfo) (*godwarf.StructType, error) {
......
......@@ -250,10 +250,10 @@ Saves the configuration file to disk, overwriting the current configuration file
Changes the value of a configuration parameter.
config subistitute-path <from> <to>
config subistitute-path <from>
config substitute-path <from> <to>
config substitute-path <from>
Adds or removes a path subistitution rule.
Adds or removes a path substitution rule.
config alias <command> <alias>
config alias <alias>
......
......@@ -454,7 +454,7 @@ func TestOnPrefixLocals(t *testing.T) {
})
}
func countOccourences(s string, needle string) int {
func countOccurrences(s string, needle string) int {
count := 0
for {
idx := strings.Index(s, needle)
......@@ -475,7 +475,7 @@ func TestIssue387(t *testing.T) {
term.MustExec("break dostuff")
for {
outstr, err := term.Exec("continue")
breakpointHitCount += countOccourences(outstr, "issue387.go:8")
breakpointHitCount += countOccurrences(outstr, "issue387.go:8")
t.Log(outstr)
if err != nil {
if !strings.Contains(err.Error(), "exited") {
......@@ -488,9 +488,9 @@ func TestIssue387(t *testing.T) {
for {
outstr = term.MustExec("next")
breakpointHitCount += countOccourences(outstr, "issue387.go:8")
breakpointHitCount += countOccurrences(outstr, "issue387.go:8")
t.Log(outstr)
if countOccourences(outstr, fmt.Sprintf("issue387.go:%d", pos)) == 0 {
if countOccurrences(outstr, fmt.Sprintf("issue387.go:%d", pos)) == 0 {
t.Fatalf("did not continue to expected position %d", pos)
}
pos++
......
......@@ -105,7 +105,7 @@ func configureSet(t *Term, args string) error {
}
if field.Kind() == reflect.Slice && field.Type().Elem().Name() == "SubstitutePathRule" {
return configureSetSubstituePath(t, rest)
return configureSetSubstitutePath(t, rest)
}
simpleArg := func(typ reflect.Type) (reflect.Value, error) {
......@@ -140,7 +140,7 @@ func configureSet(t *Term, args string) error {
return nil
}
func configureSetSubstituePath(t *Term, rest string) error {
func configureSetSubstitutePath(t *Term, rest string) error {
argv := config.SplitQuotedFields(rest, '"')
switch len(argv) {
case 1: // delete substitute-path rule
......
......@@ -153,9 +153,9 @@ func (t *Term) Println(prefix, str string) {
fmt.Fprintf(t.stdout, "%s%s\n", prefix, str)
}
// Substitues directory to source file.
// Substitutes directory to source file.
//
// Ensures that only directory is substitued, for example:
// Ensures that only directory is substituted, for example:
// substitute from `/dir/subdir`, substitute to `/new`
// for file path `/dir/subdir/file` will return file path `/new/file`.
// for file path `/dir/subdir-2/file` substitution will not be applied.
......
......@@ -210,7 +210,7 @@ func ConvertFunction(fn *proc.Function) *Function {
}
// fn here used to be a *gosym.Func, the fields Type and GoType below
// corresponded to the omonymous field of gosym.Func. Since the contents of
// corresponded to the homonymous field of gosym.Func. Since the contents of
// those fields is not documented their value was replaced with 0 when
// gosym.Func was replaced by debug_info entries.
return &Function{
......
......@@ -106,7 +106,7 @@ type Thread struct {
// Breakpoint this thread is stopped at
Breakpoint *Breakpoint `json:"breakPoint,omitempty"`
// Informations requested by the current breakpoint
BreakpointInfo *BreakpointInfo `json:"breakPointInfo,omitrempty"`
BreakpointInfo *BreakpointInfo `json:"breakPointInfo,omitempty"`
}
type Location struct {
......@@ -201,7 +201,7 @@ type Variable struct {
// Array and slice elements, member fields of structs, key/value pairs of maps, value of complex numbers
// The Name field in this slice will always be the empty string except for structs (when it will be the field name) and for complex numbers (when it will be "real" and "imaginary")
// For maps each map entry will have to items in this slice, even numbered items will represent map keys and odd numbered items will represent their values
// This field's length is capped at proc.maxArrayValues for slices and arrays and 2*proc.maxArrayValues for maps, in the circumnstances where the cap takes effect len(Children) != Len
// This field's length is capped at proc.maxArrayValues for slices and arrays and 2*proc.maxArrayValues for maps, in the circumstances where the cap takes effect len(Children) != Len
// The other length cap applied to this field is related to maximum recursion depth, when the maximum recursion depth is reached this field is left empty, contrary to the previous one this cap also applies to structs (otherwise structs will always have all their member fields returned)
Children []Variable `json:"children"`
......
......@@ -86,7 +86,7 @@ func (c *RPCClient) continueDir(cmd string) <-chan *api.DebuggerState {
state.Err = err
}
if state.Exited {
// Error types apparantly cannot be marshalled by Go correctly. Must reset error here.
// Error types apparently cannot be marshalled by Go correctly. Must reset error here.
state.Err = fmt.Errorf("Process %d has exited with status %d", c.ProcessPid(), state.ExitStatus)
}
ch <- &state
......
......@@ -573,7 +573,7 @@ type DisassembleOut struct {
//
// If both StartPC and EndPC are non-zero the specified range will be disassembled, otherwise the function containing StartPC will be disassembled.
//
// Scope is used to mark the instruction the specified gorutine is stopped at.
// Scope is used to mark the instruction the specified goroutine is stopped at.
//
// Disassemble will also try to calculate the destination address of an absolute indirect CALL if it happens to be the instruction the selected goroutine is stopped at.
func (c *RPCServer) Disassemble(arg DisassembleIn, out *DisassembleOut) error {
......
......@@ -94,7 +94,7 @@ func findLocationHelper(t *testing.T, c LocationFinder, loc string, shouldErr bo
}
if checkAddr != 0 && checkAddr != locs[0].PC {
t.Fatalf("Wrong address returned for location <%s> (got %#x, epected %#x)", loc, locs[0].PC, checkAddr)
t.Fatalf("Wrong address returned for location <%s> (got %#x, expected %#x)", loc, locs[0].PC, checkAddr)
}
addrs := make([]uint64, len(locs))
......
......@@ -1392,7 +1392,7 @@ func TestClientServerConsistentExit(t *testing.T) {
// This test is useful because it ensures that Next and Continue operations both
// exit with the same exit status and details when the target application terminates.
// Other program execution API calls should also behave in the same way.
// An error should be pressent in state.Err.
// An error should be present in state.Err.
withTestClient2("pr1055", t, func(c service.Client) {
fp := testProgPath(t, "pr1055")
_, err := c.CreateBreakpoint(&api.Breakpoint{File: fp, Line: 12})
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册