Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
23 changes: 6 additions & 17 deletions pkg/proc/eval.go
Original file line number Diff line number Diff line change
Expand Up @@ -881,21 +881,15 @@ func (scope *EvalScope) evalTypeCast(node *ast.CallExpr) (*Variable, error) {
}
case *godwarf.FloatType:
switch argv.Kind {
case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
fallthrough
case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
fallthrough
case reflect.Float32, reflect.Float64:

case reflect.Float32, reflect.Float64, reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
v.Value = argv.Value
return v, nil
}
case *godwarf.ComplexType:
switch argv.Kind {
case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
fallthrough
case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
fallthrough
case reflect.Float32, reflect.Float64:

case reflect.Float32, reflect.Float64, reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
v.Value = argv.Value
return v, nil
}
Expand Down Expand Up @@ -1613,13 +1607,8 @@ func (scope *EvalScope) evalBinary(node *ast.BinaryExpr) (*Variable, error) {
// Both xv and yv must be loaded and have a compatible type (as determined by negotiateType)
func compareOp(op token.Token, xv *Variable, yv *Variable) (bool, error) {
switch xv.Kind {
case reflect.Bool:
fallthrough
case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
fallthrough
case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
fallthrough
case reflect.Float32, reflect.Float64, reflect.Complex64, reflect.Complex128:

case reflect.Float32, reflect.Float64, reflect.Complex64, reflect.Complex128, reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr, reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Bool:
return constantCompare(op, xv.Value, yv.Value)
case reflect.String:
if xv.Len != yv.Len {
Expand Down
5 changes: 2 additions & 3 deletions pkg/proc/variables.go
Original file line number Diff line number Diff line change
Expand Up @@ -2219,9 +2219,8 @@ func (v *Variable) ConstDescr() string {
}

switch v.Kind {
case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
fallthrough
case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:

case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr, reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
n, _ := constant.Int64Val(v.Value)
return ctyp.describe(n)
}
Expand Down
3 changes: 1 addition & 2 deletions pkg/proc/x86_disasm.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ func (inst *x86Inst) Text(flavour AssemblyFlavour, pc uint64, symLookup func(uin
text = x86asm.GNUSyntax(x86asm.Inst(*inst), pc, symLookup)
case GoFlavour:
text = x86asm.GoSyntax(x86asm.Inst(*inst), pc, symLookup)
case IntelFlavour:
fallthrough

default:
text = x86asm.IntelSyntax(x86asm.Inst(*inst), pc, symLookup)
}
Expand Down