mirror of
https://github.com/go-delve/delve.git
synced 2025-10-30 10:17:03 +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 {
|
func complexType(typename string) bool {
|
||||||
dot := 0
|
|
||||||
for _, ch := range typename {
|
for _, ch := range typename {
|
||||||
switch ch {
|
switch ch {
|
||||||
case '*', '[', '<', '{', '(', ' ':
|
case '*', '[', '<', '{', '(', ' ':
|
||||||
return true
|
return true
|
||||||
case '.':
|
|
||||||
dot++
|
|
||||||
if dot > 1 {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
@ -73,7 +67,7 @@ func (dbp *Process) loadPackageMap() error {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
dot := strings.Index(typename, ".")
|
dot := strings.LastIndex(typename, ".")
|
||||||
if dot < 0 {
|
if dot < 0 {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user