*: Change comments to match common Go standarts (#3221)

This commit is contained in:
Oleksandr Redko 2022-12-14 18:56:07 +02:00 committed by GitHub
parent 753cb4cc3b
commit 9523849883
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 17 additions and 17 deletions

@ -36,7 +36,7 @@ type dataFormat interface {
addrsize() int
}
// Some parts of DWARF have no data format, e.g., abbrevs.
// UnknownFormat is a struct for some parts of DWARF that have no data format, e.g., abbrevs.
type UnknownFormat struct{}
func (u UnknownFormat) version() int {
@ -66,7 +66,7 @@ func (b *buf) Uint8() uint8 {
return val
}
// Read a varint, which is 7 bits per byte, little endian.
// Varint reads a varint, which is 7 bits per byte, little endian.
// the 0x80 bit means read another byte.
func (b *buf) Varint() (c uint64, bits uint) {
for i := 0; i < len(b.data); i++ {
@ -82,13 +82,13 @@ func (b *buf) Varint() (c uint64, bits uint) {
return 0, 0
}
// Unsigned int is just a varint.
// Uint is just a varint.
func (b *buf) Uint() uint64 {
x, _ := b.Varint()
return x
}
// Signed int is a sign-extended varint.
// Int is a sign-extended varint.
func (b *buf) Int() int64 {
ux, bits := b.Varint()
x := int64(ux)

@ -396,7 +396,7 @@ func (t *thread) SetDX(uint64) error {
return ErrChangeRegisterCore
}
// ChangeRegs will always return an error, you cannot
// SetReg will always return an error, you cannot
// change register values when debugging core files.
func (t *thread) SetReg(regNum uint64, reg *op.DwarfRegister) error {
return ErrChangeRegisterCore

@ -64,7 +64,7 @@ type RecordingManipulation interface {
// Recorded returns true if the current process is a recording and the path
// to the trace directory.
Recorded() (recorded bool, tracedir string)
// Direction changes execution direction.
// ChangeDirection changes execution direction.
ChangeDirection(Direction) error
// GetDirection returns the current direction of execution.
GetDirection() Direction

@ -1,4 +1,4 @@
// This package contains functions and data structures used by both the
// Package linutil contains functions and data structures used by both the
// linux implementation of the native backend and the core backend to deal
// with structures used by the linux kernel.
package linutil

@ -81,7 +81,7 @@ const (
// the variable is the return value of a function call and allocated on a
// frame that no longer exists)
VariableFakeAddress
// VariableCPrt means the variable is a C pointer
// VariableCPtr means the variable is a C pointer
VariableCPtr
// VariableCPURegister means this variable is a CPU register.
VariableCPURegister