mirror of
https://github.com/go-delve/delve.git
synced 2025-10-29 17:56:45 +08:00
bugfix: proc/types: loadPackageMap and github.com packages
Makes loadPackageMap actually work with github.com/... packages
This commit is contained in:
@ -38,16 +38,10 @@ func (dbp *Process) findTypeExpr(expr ast.Expr) (dwarf.Type, error) {
|
||||
}
|
||||
|
||||
func complexType(typename string) bool {
|
||||
dot := 0
|
||||
for _, ch := range typename {
|
||||
switch ch {
|
||||
case '*', '[', '<', '{', '(', ' ':
|
||||
return true
|
||||
case '.':
|
||||
dot++
|
||||
if dot > 1 {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
return false
|
||||
@ -73,7 +67,7 @@ func (dbp *Process) loadPackageMap() error {
|
||||
continue
|
||||
}
|
||||
|
||||
dot := strings.Index(typename, ".")
|
||||
dot := strings.LastIndex(typename, ".")
|
||||
if dot < 0 {
|
||||
continue
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user