@Test public void testGetAddress() { try { SegmentedAddress addr = (SegmentedAddress) space.getAddress("12345"); Assert.assertEquals(0x2345, addr.getSegmentOffset()); Assert.assertEquals(0x1000, addr.getSegment()); Assert.assertEquals(0x12345, addr.getOffset()); addr = (SegmentedAddress) space.getAddress("1000:2345"); Assert.assertEquals(0x2345, addr.getSegmentOffset()); Assert.assertEquals(0x1000, addr.getSegment()); Assert.assertEquals(0x12345, addr.getOffset()); addr = (SegmentedAddress) space.getAddress("Test:12345"); Assert.assertEquals(0x2345, addr.getSegmentOffset()); Assert.assertEquals(0x1000, addr.getSegment()); Assert.assertEquals(0x12345, addr.getOffset()); addr = (SegmentedAddress) space.getAddress("Test:1000:2345"); Assert.assertEquals(0x2345, addr.getSegmentOffset()); Assert.assertEquals(0x1000, addr.getSegment()); Assert.assertEquals(0x12345, addr.getOffset()); } catch (AddressFormatException e) { Assert.fail(e.getMessage()); } try { Address addr = space.getAddress(":10"); assertNull(addr); addr = space.getAddress("Foo:0"); assertNull(addr); } catch (AddressFormatException e) { Assert.fail(e.getMessage()); } try { space.getAddress("3:ffffff"); Assert.fail("Should not have given back an address!"); } catch (AddressFormatException e) { } try { space.getAddress("Testxyz"); Assert.fail("Should not have given back an address!"); } catch (AddressFormatException e) { } try { space.getAddress("ffffff"); Assert.fail("Should not have given back an address!"); } catch (AddressFormatException e) { } }
@Override public Address getAddress(String addrString) throws AddressFormatException { return getAddress(addrString, true); }
SegmentedAddressSpace extends GenericAddressSpace { @Override public Address getAddress(String addrString) throws AddressFormatException { return getAddress(addrString, true); } }
SegmentedAddressSpace extends GenericAddressSpace { @Override public Address getAddress(String addrString) throws AddressFormatException { return getAddress(addrString, true); } SegmentedAddressSpace(String name, int unique); }
SegmentedAddressSpace extends GenericAddressSpace { @Override public Address getAddress(String addrString) throws AddressFormatException { return getAddress(addrString, true); } SegmentedAddressSpace(String name, int unique); @Override Address getAddress(String addrString); @Override Address getAddress(String addrString, boolean caseSensitive); @Override Address subtract(Address addr, long displacement); @Override Address add(Address addr, long displacement); @Override SegmentedAddress getAddress(long byteOffset); @Override SegmentedAddress getAddressInThisSpaceOnly(long byteOffset); SegmentedAddress getAddress(int segment, int segmentOffset); @Override SegmentedAddressSpace getPhysicalSpace(); @Override int getPointerSize(); }
SegmentedAddressSpace extends GenericAddressSpace { @Override public Address getAddress(String addrString) throws AddressFormatException { return getAddress(addrString, true); } SegmentedAddressSpace(String name, int unique); @Override Address getAddress(String addrString); @Override Address getAddress(String addrString, boolean caseSensitive); @Override Address subtract(Address addr, long displacement); @Override Address add(Address addr, long displacement); @Override SegmentedAddress getAddress(long byteOffset); @Override SegmentedAddress getAddressInThisSpaceOnly(long byteOffset); SegmentedAddress getAddress(int segment, int segmentOffset); @Override SegmentedAddressSpace getPhysicalSpace(); @Override int getPointerSize();  }