mirror of
https://github.com/beego/bee.git
synced 2025-06-23 18:50:25 +00:00
Use Delve v0.12.1 instead of master
This commit is contained in:
22
vendor/github.com/derekparker/delve/service/api/conversions.go
generated
vendored
22
vendor/github.com/derekparker/delve/service/api/conversions.go
generated
vendored
@ -9,8 +9,7 @@ import (
|
||||
"reflect"
|
||||
"strconv"
|
||||
|
||||
"github.com/derekparker/delve/pkg/proc"
|
||||
|
||||
"github.com/derekparker/delve/proc"
|
||||
"golang.org/x/debug/dwarf"
|
||||
)
|
||||
|
||||
@ -99,19 +98,6 @@ func prettyTypeName(typ dwarf.Type) string {
|
||||
return r
|
||||
}
|
||||
|
||||
func convertFloatValue(v *proc.Variable, sz int) string {
|
||||
switch v.FloatSpecial {
|
||||
case proc.FloatIsPosInf:
|
||||
return "+Inf"
|
||||
case proc.FloatIsNegInf:
|
||||
return "-Inf"
|
||||
case proc.FloatIsNaN:
|
||||
return "NaN"
|
||||
}
|
||||
f, _ := constant.Float64Val(v.Value)
|
||||
return strconv.FormatFloat(f, 'f', -1, sz)
|
||||
}
|
||||
|
||||
// ConvertVar converts from proc.Variable to api.Variable.
|
||||
func ConvertVar(v *proc.Variable) *Variable {
|
||||
r := Variable{
|
||||
@ -133,9 +119,11 @@ func ConvertVar(v *proc.Variable) *Variable {
|
||||
if v.Value != nil {
|
||||
switch v.Kind {
|
||||
case reflect.Float32:
|
||||
r.Value = convertFloatValue(v, 32)
|
||||
f, _ := constant.Float64Val(v.Value)
|
||||
r.Value = strconv.FormatFloat(f, 'f', -1, 32)
|
||||
case reflect.Float64:
|
||||
r.Value = convertFloatValue(v, 64)
|
||||
f, _ := constant.Float64Val(v.Value)
|
||||
r.Value = strconv.FormatFloat(f, 'f', -1, 64)
|
||||
case reflect.String, reflect.Func:
|
||||
r.Value = constant.StringVal(v.Value)
|
||||
default:
|
||||
|
4
vendor/github.com/derekparker/delve/service/api/prettyprint.go
generated
vendored
4
vendor/github.com/derekparker/delve/service/api/prettyprint.go
generated
vendored
@ -87,9 +87,7 @@ func (v *Variable) writeTo(buf io.Writer, top, newlines, includeType bool, inden
|
||||
}
|
||||
data := v.Children[0]
|
||||
if data.Kind == reflect.Ptr {
|
||||
if len(data.Children) == 0 {
|
||||
fmt.Fprintf(buf, "...")
|
||||
} else if data.Children[0].Addr == 0 {
|
||||
if data.Children[0].Addr == 0 {
|
||||
fmt.Fprintf(buf, "nil")
|
||||
} else if data.Children[0].OnlyAddr {
|
||||
fmt.Fprintf(buf, "0x%x", v.Children[0].Addr)
|
||||
|
2
vendor/github.com/derekparker/delve/service/api/types.go
generated
vendored
2
vendor/github.com/derekparker/delve/service/api/types.go
generated
vendored
@ -8,7 +8,7 @@ import (
|
||||
"strconv"
|
||||
"unicode"
|
||||
|
||||
"github.com/derekparker/delve/pkg/proc"
|
||||
"github.com/derekparker/delve/proc"
|
||||
)
|
||||
|
||||
var NotExecutableErr = proc.NotExecutableErr
|
||||
|
Reference in New Issue
Block a user