variables: Misc cleanup / renaming
This commit is contained in:
parent
c9b517067b
commit
af16cfa90b
@ -342,11 +342,11 @@ func (scope *EvalScope) EvalVariable(name string) (*Variable, error) {
|
|||||||
|
|
||||||
// Sets the value of the named variable
|
// Sets the value of the named variable
|
||||||
func (scope *EvalScope) SetVariable(name, value string) error {
|
func (scope *EvalScope) SetVariable(name, value string) error {
|
||||||
addr, err := scope.ExtractVariableInfo(name)
|
v, err := scope.ExtractVariableInfo(name)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
return addr.setValue(value)
|
return v.setValue(value)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (scope *EvalScope) extractVariableFromEntry(entry *dwarf.Entry) (*Variable, error) {
|
func (scope *EvalScope) extractVariableFromEntry(entry *dwarf.Entry) (*Variable, error) {
|
||||||
@ -922,8 +922,10 @@ func (v *Variable) readUint(size int64) (string, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (v *Variable) writeUint(signed bool, value string, size int64) error {
|
func (v *Variable) writeUint(signed bool, value string, size int64) error {
|
||||||
var n uint64
|
var (
|
||||||
var err error
|
n uint64
|
||||||
|
err error
|
||||||
|
)
|
||||||
if signed {
|
if signed {
|
||||||
var m int64
|
var m int64
|
||||||
m, err = strconv.ParseInt(value, 0, int(size*8))
|
m, err = strconv.ParseInt(value, 0, int(size*8))
|
||||||
|
Loading…
Reference in New Issue
Block a user