|  |  | @ -47,13 +47,13 @@ class address | 
			
		
	
		
		
			
				
					
					|  |  |  |         addr_ = addr; |  |  |  |         addr_ = addr; | 
			
		
	
		
		
			
				
					
					|  |  |  |         valid = false; |  |  |  |         valid = false; | 
			
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  |         address & operator=(const uint64_t in) |  |  |  |     virtual address & operator=(const uint64_t in) | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |     { |  |  |  |     { | 
			
		
	
		
		
			
				
					
					|  |  |  |         addr_ = in; |  |  |  |         addr_ = in; | 
			
		
	
		
		
			
				
					
					|  |  |  |         valid = false; |  |  |  |         valid = false; | 
			
		
	
		
		
			
				
					
					|  |  |  |         return *this; |  |  |  |         return *this; | 
			
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  |         bool isValid(SegmentedFinder& sff) |  |  |  |     virtual bool isValid(SegmentedFinder& sff) | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |     { |  |  |  |     { | 
			
		
	
		
		
			
				
					
					|  |  |  |         if(valid) return true; |  |  |  |         if(valid) return true; | 
			
		
	
		
		
			
				
					
					|  |  |  |         if(sff.getSegmentForAddress(addr_)) |  |  |  |         if(sff.getSegmentForAddress(addr_)) | 
			
		
	
	
		
		
			
				
					|  |  | @ -61,15 +61,43 @@ class address | 
			
		
	
		
		
			
				
					
					|  |  |  |             valid = 1; |  |  |  |             valid = 1; | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     virtual bool equals (SegmentedFinder & sf, address & rhs) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         return rhs.addr_ == addr_; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  | }; |  |  |  | }; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | // pointer to a null-terminated byte string
 | 
			
		
	
		
		
			
				
					
					|  |  |  | class Cstr: public address |  |  |  | class Cstr: public address | 
			
		
	
		
		
			
				
					
					|  |  |  | { |  |  |  | { | 
			
		
	
		
		
			
				
					
					|  |  |  |     void print(SegmentedFinder & sf) |  |  |  |     void print(SegmentedFinder & sf) | 
			
		
	
		
		
			
				
					
					|  |  |  |     { |  |  |  |     { | 
			
		
	
		
		
			
				
					
					|  |  |  |         cout << hex << "0x" << addr_ << ": \"" << sf.Translate<char>(addr_) << "\"" << endl; |  |  |  |         cout << hex << "0x" << addr_ << ": \"" << sf.Translate<char>(addr_) << "\"" << endl; | 
			
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     bool equals(SegmentedFinder & sf,const char * rhs) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         uint32_t addr2 = *(sf.Translate<uint32_t>(addr_)); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         return strcmp(sf.Translate<const char>(addr2), rhs) == 0; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     template <class Predicate, class inType> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     bool equalsP(SegmentedFinder & sf,inType rhs) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         return Predicate(addr_, sf, rhs); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     bool isValid(SegmentedFinder& sf) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         if (address::isValid(sf)) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             // read the pointer
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             uint32_t addr2 = *(sf.Translate<uint32_t>(addr_)); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             // is it a real pointer? a pretty weak test, but whatever.
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             if(sf.getSegmentForAddress(addr2)) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 return true; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         return false; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  | }; |  |  |  | }; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | // STL STRING
 |  |  |  | // STL STRING
 | 
			
		
	
		
		
			
				
					
					|  |  |  | #ifdef LINUX_BUILD |  |  |  | #ifdef LINUX_BUILD | 
			
		
	
		
		
			
				
					
					|  |  |  | class STLstr: public address |  |  |  | class STLstr: public address | 
			
		
	
	
		
		
			
				
					|  |  | 
 |