GP-943 Resurected and revised Structure.getComponentAt method. Also

revised behavior of Structure.getComponentContaining.  Both will now
ignore zero-length components.
This commit is contained in:
ghidra1
2021-09-25 14:12:15 -04:00
parent 22e26916b3
commit 27892f659a
11 changed files with 428 additions and 79 deletions

View File

@@ -142,9 +142,9 @@ public class DataDBTest extends AbstractGenericTest {
assertNotNull(c);
assertEquals("c1", c.getComponentPathName());
Data c2 = c.getComponentContaining(4);
Data c2 = c.getComponentContaining(4); // zero-length component is ignored
assertNotNull(c2);
assertEquals("c1.", c2.getComponentPathName()); // zero-bitfield has no name
assertEquals("c1.bf1", c2.getComponentPathName());
Data c3 = c.getComponentContaining(5);
assertNotNull(c3);