// ParseRegion parses an address region. The region is written as loc-loc,
// where 'loc' is a location specified as either a file:line source code
// location (if the elf binary has DWARF debugging information), or a direct
// hexadecimal address in the form 0x...
ParseRegion parses an address region. The region is written as loc-loc,
where 'loc' is a location specified as either a file:line source code
location (if the elf binary has DWARF debugging information), or a direct
hexadecimal address in the form 0x
// ParseRegion parses an address region . The region is written as loc - loc // where ' loc ' is a location specified as either a file : line source code // location ( if the elf binary has DWARF debugging information ) or a direct // hexadecimal address in the form 0x ...
func ParseRegion(s string, bin *bininfo.BinFile) (*utrace.AddressRegion, error) {
	parts := strings.Split(s, "-")
	if len(parts) != 2 {
		return nil, errors.New("invalid region")
	}
	start, err := parseLocation(parts[0], bin)
	if err != nil {
		return nil, err
	}
	end, err := parseLocation(parts[1], bin)
	if err != nil {
		return nil, err
	}
	return &utrace.AddressRegion{
		StartAddr: start,
		EndAddr:   end,
	}, nil
}
func ParseRegion ( s string , bin * bininfo . BinFile ) ( * utrace . AddressRegion , error ) { parts := strings . Split ( s , " " ) if len ( parts ) != 2 { return nil , errors . New ( " " ) } start , err := parseLocation ( parts [ 0 ] , bin ) if err != nil { return nil , err } end , err := parseLocation ( parts [ 1 ] , bin ) if err != nil { return nil , err } return & utrace . AddressRegion { StartAddr : start , EndAddr : end , } , nil }
ParseRegion parses an address region.
ParseRegion parses an address region .