Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatible with GOP file breakpoints #13

Closed
wants to merge 16 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: delete error .gop source
  • Loading branch information
LiusCraft committed Jan 22, 2024
commit b75e9218c5c9dd5c7ec09fb9c5f1ad56034a53b3
5 changes: 3 additions & 2 deletions pkg/proc/bininfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ func (bi *BinaryInfo) PackagePathMap(path string) map[string]string {
_, err := os.Open(currentDir + "go.mod")
if err == nil {
bi.buildModInfoMap["main"] = currentDir
bi.buildModInfoMap[binfo.Path] = currentDir
bi.buildModInfoMap[binfo.Path+"/"] = currentDir
break
}
}
Expand Down Expand Up @@ -2335,7 +2335,8 @@ func (bi *BinaryInfo) loadDebugInfoMaps(image *Image, debugInfoBytes, debugLineB
cuName = filepath.ToSlash(cuName)
}
for _, fileEntry := range cu.lineInfo.FileNames {
if filepath.Ext(fileEntry.Path) != ".go" && !filepath.IsAbs(fileEntry.Path) {
fileExt := filepath.Ext(fileEntry.Path)
if fileExt != "" && fileExt != "go" && !filepath.IsAbs(fileEntry.Path) {
filePakage := strings.TrimSuffix(cuName, cu.lineInfo.IncludeDirs[fileEntry.DirIdx])
absPath := bi.buildModInfoMap[filePakage] + fileEntry.Path
cu.lineInfo.Lookup[absPath] = fileEntry
Expand Down