internal/gocore: fix some typos in comments
Change-Id: I62aa60953035e5ee68e7c0b87b44579b2b23228b
GitHub-Last-Rev: 03db157c7b6d50c3e7ca0cdae9958c48e971b3c0
GitHub-Pull-Request: golang/debug#20
Reviewed-on: https://go-review.googlesource.com/c/debug/+/580295
Reviewed-by: Keith Randall <khr@golang.org>
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@google.com>
diff --git a/internal/gocore/process.go b/internal/gocore/process.go
index 52853d5..bbedd02 100644
--- a/internal/gocore/process.go
+++ b/internal/gocore/process.go
@@ -164,7 +164,7 @@
// changes, making the difference difficult to detect. As a workaround,
// we check on the version explicitly.
//
- // Go 1.17 added runtime._func.flag, so use that as a sentinal for this
+ // Go 1.17 added runtime._func.flag, so use that as a sentinel for this
// version.
p.is117OrGreater = p.findType("runtime._func").HasField("flag")
diff --git a/internal/gocore/type.go b/internal/gocore/type.go
index 84c4769..8da78bf 100644
--- a/internal/gocore/type.go
+++ b/internal/gocore/type.go
@@ -206,7 +206,7 @@
if d != 0 && len(candidates) > 1 && !ifaceIndir(a, p) {
ptr := p.proc.ReadPtr(d)
obj, off := p.FindObject(ptr)
- // only usefull while it point to the head of an object,
+ // only useful while it point to the head of an object,
// otherwise, the GC object size should bigger than the size of the type.
if obj != 0 && off == 0 {
sz := p.Size(obj)