aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/vendor/github.com/google/pprof/internal/binutils
diff options
context:
space:
mode:
authorDmitri Shuralyov <dmitshur@golang.org>2024-02-15 23:59:52 -0500
committerGopher Robot <gobot@golang.org>2024-02-16 15:19:53 +0000
commit63dd79c07b0026b58f421a5273c41e705ccb73d1 (patch)
tree78ae03458e1b1f1ea8e3dde24533f6b4eb1af94e /src/cmd/vendor/github.com/google/pprof/internal/binutils
parent3b51581261704bfc3e6feeb29b6d2588b163777d (diff)
downloadgo-63dd79c07b0026b58f421a5273c41e705ccb73d1.tar.xz
cmd/pprof: update vendored github.com/google/pprof
Pull in the latest published version of github.com/google/pprof as part of the continuous process of keeping Go's dependencies up to date. Done with: go get github.com/google/pprof go mod tidy go mod vendor For #36905. Fixes #65741. Change-Id: Ice7b085c03ff69be97929cbe47bfd91954907529 Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest Reviewed-on: https://go-review.googlesource.com/c/go/+/564636 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com>
Diffstat (limited to 'src/cmd/vendor/github.com/google/pprof/internal/binutils')
-rw-r--r--src/cmd/vendor/github.com/google/pprof/internal/binutils/addr2liner_llvm.go22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/cmd/vendor/github.com/google/pprof/internal/binutils/addr2liner_llvm.go b/src/cmd/vendor/github.com/google/pprof/internal/binutils/addr2liner_llvm.go
index 491422fcda..3049545b6b 100644
--- a/src/cmd/vendor/github.com/google/pprof/internal/binutils/addr2liner_llvm.go
+++ b/src/cmd/vendor/github.com/google/pprof/internal/binutils/addr2liner_llvm.go
@@ -129,6 +129,7 @@ func (d *llvmSymbolizer) readFrame() (plugin.Frame, bool) {
}
linenumber := 0
+ columnnumber := 0
// The llvm-symbolizer outputs the <file_name>:<line_number>:<column_number>.
// When it cannot identify the source code location, it outputs "??:0:0".
// Older versions output just the filename and line number, so we check for
@@ -137,22 +138,27 @@ func (d *llvmSymbolizer) readFrame() (plugin.Frame, bool) {
fileline = ""
} else {
switch split := strings.Split(fileline, ":"); len(split) {
- case 1:
- // filename
- fileline = split[0]
- case 2, 3:
- // filename:line , or
- // filename:line:disc , or
- fileline = split[0]
+ case 3:
+ // filename:line:column
+ if col, err := strconv.Atoi(split[2]); err == nil {
+ columnnumber = col
+ }
+ fallthrough
+ case 2:
+ // filename:line
if line, err := strconv.Atoi(split[1]); err == nil {
linenumber = line
}
+ fallthrough
+ case 1:
+ // filename
+ fileline = split[0]
default:
// Unrecognized, ignore
}
}
- return plugin.Frame{Func: funcname, File: fileline, Line: linenumber}, false
+ return plugin.Frame{Func: funcname, File: fileline, Line: linenumber, Column: columnnumber}, false
}
// addrInfo returns the stack frame information for a specific program