@Test
	public void testRefAddr() throws IOException {
		// @formatter:off
		BinaryReader br = br(
			(byte) 0, (byte) 0, (byte) 0, (byte) 55,
			(byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff,
			(byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 55,
			(byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xfe
			);
		// @formatter:on

		DWARFAttributeValue result = read(br, DW_AT_byte_size, DW_FORM_ref_addr);
		assertTrue("Should be ref", result instanceof DWARFNumericAttribute);
		assertEquals("should be 55", 55, ((DWARFNumericAttribute) result).getValue());

		result = read(br, DW_AT_byte_size, DW_FORM_ref_addr);
		assertTrue("Should be ref", result instanceof DWARFNumericAttribute);
		assertEquals("should be ffffffff", 0xff_ff_ff_ffL,
			((DWARFNumericAttribute) result).getValue());

		addCompUnit64();

		result = read(br, DW_AT_byte_size, DW_FORM_ref_addr);
		assertTrue("Should be ref", result instanceof DWARFNumericAttribute);
		assertEquals("should be 55", 55, ((DWARFNumericAttribute) result).getValue());

		addCompUnit64();
		result = read(br, DW_AT_byte_size, DW_FORM_ref_addr);
		assertTrue("Should be ref", result instanceof DWARFNumericAttribute);
		assertEquals("should be fffffffffffffffe", 0xff_ff_ff_ff_ff_ff_ff_feL,
			((DWARFNumericAttribute) result).getValue());
	}
Test reading binary representations of DWARF attributes from raw bytes.
Ghidra/Features/Base/src/test/java/ghidra/app/util/bin/format/dwarf/attribs/DWARFAttributeFactoryTest.java