|
39 | 39 | import ghidra.dbg.target.TargetMemoryRegion;
|
40 | 40 | import ghidra.dbg.target.schema.SchemaContext;
|
41 | 41 | import ghidra.dbg.target.schema.TargetObjectSchema.SchemaName;
|
| 42 | +import ghidra.dbg.target.schema.XmlSchemaContext; |
42 | 43 | import ghidra.debug.api.modules.RegionMapProposal.RegionMapEntry;
|
43 | 44 | import ghidra.debug.api.tracemgr.DebuggerCoordinates;
|
44 |
| -import ghidra.dbg.target.schema.XmlSchemaContext; |
45 | 45 | import ghidra.program.model.address.*;
|
46 | 46 | import ghidra.program.model.mem.Memory;
|
47 | 47 | import ghidra.program.model.mem.MemoryBlock;
|
@@ -151,20 +151,29 @@ protected void assertTableSize(int size) {
|
151 | 151 | protected void assertRow(int position, Object object, String name, Address start,
|
152 | 152 | Address end, long length, String flags) {
|
153 | 153 | ValueRow row = provider.panel.getAllItems().get(position);
|
154 |
| - DynamicTableColumn<ValueRow, ?, Trace> nameCol = |
155 |
| - provider.panel.getColumnByNameAndType("Name", ValueRow.class).getValue(); |
156 |
| - DynamicTableColumn<ValueRow, ?, Trace> startCol = |
157 |
| - provider.panel.getColumnByNameAndType("Start", ValueProperty.class).getValue(); |
158 |
| - DynamicTableColumn<ValueRow, ?, Trace> endCol = |
159 |
| - provider.panel.getColumnByNameAndType("End", ValueProperty.class).getValue(); |
160 |
| - DynamicTableColumn<ValueRow, ?, Trace> lengthCol = |
161 |
| - provider.panel.getColumnByNameAndType("Length", ValueProperty.class).getValue(); |
162 |
| - DynamicTableColumn<ValueRow, ?, Trace> readCol = |
163 |
| - provider.panel.getColumnByNameAndType("Read", ValueProperty.class).getValue(); |
164 |
| - DynamicTableColumn<ValueRow, ?, Trace> writeCol = |
165 |
| - provider.panel.getColumnByNameAndType("Write", ValueProperty.class).getValue(); |
166 |
| - DynamicTableColumn<ValueRow, ?, Trace> executeCol = |
167 |
| - provider.panel.getColumnByNameAndType("Execute", ValueProperty.class).getValue(); |
| 154 | + var tableModel = QueryPanelTestHelper.getTableModel(provider.panel); |
| 155 | + GhidraTable table = QueryPanelTestHelper.getTable(provider.panel); |
| 156 | + DynamicTableColumn<ValueRow, ?, Trace> nameCol = QueryPanelTestHelper |
| 157 | + .getColumnByNameAndType(tableModel, table, "Name", ValueRow.class) |
| 158 | + .column(); |
| 159 | + DynamicTableColumn<ValueRow, ?, Trace> startCol = QueryPanelTestHelper |
| 160 | + .getColumnByNameAndType(tableModel, table, "Start", ValueProperty.class) |
| 161 | + .column(); |
| 162 | + DynamicTableColumn<ValueRow, ?, Trace> endCol = QueryPanelTestHelper |
| 163 | + .getColumnByNameAndType(tableModel, table, "End", ValueProperty.class) |
| 164 | + .column(); |
| 165 | + DynamicTableColumn<ValueRow, ?, Trace> lengthCol = QueryPanelTestHelper |
| 166 | + .getColumnByNameAndType(tableModel, table, "Length", ValueProperty.class) |
| 167 | + .column(); |
| 168 | + DynamicTableColumn<ValueRow, ?, Trace> readCol = QueryPanelTestHelper |
| 169 | + .getColumnByNameAndType(tableModel, table, "Read", ValueProperty.class) |
| 170 | + .column(); |
| 171 | + DynamicTableColumn<ValueRow, ?, Trace> writeCol = QueryPanelTestHelper |
| 172 | + .getColumnByNameAndType(tableModel, table, "Write", ValueProperty.class) |
| 173 | + .column(); |
| 174 | + DynamicTableColumn<ValueRow, ?, Trace> executeCol = QueryPanelTestHelper |
| 175 | + .getColumnByNameAndType(tableModel, table, "Execute", ValueProperty.class) |
| 176 | + .column(); |
168 | 177 |
|
169 | 178 | assertSame(object, row.getValue().getValue());
|
170 | 179 | assertEquals(name, rowColDisplay(row, nameCol));
|
@@ -349,10 +358,14 @@ public void testDoubleClickNavigates() throws Exception {
|
349 | 358 | });
|
350 | 359 | waitForPass(() -> assertFalse(tb.trace.getProgramView().getMemory().isEmpty()));
|
351 | 360 |
|
352 |
| - int startColIdx = |
353 |
| - provider.panel.getColumnByNameAndType("Start", ValueProperty.class).getKey(); |
354 |
| - int endColIdx = provider.panel.getColumnByNameAndType("End", ValueProperty.class).getKey(); |
| 361 | + var tableModel = QueryPanelTestHelper.getTableModel(provider.panel); |
355 | 362 | GhidraTable table = QueryPanelTestHelper.getTable(provider.panel);
|
| 363 | + int startColIdx = QueryPanelTestHelper |
| 364 | + .getColumnByNameAndType(tableModel, table, "Start", ValueProperty.class) |
| 365 | + .viewIndex(); |
| 366 | + int endColIdx = QueryPanelTestHelper |
| 367 | + .getColumnByNameAndType(tableModel, table, "End", ValueProperty.class) |
| 368 | + .viewIndex(); |
356 | 369 |
|
357 | 370 | clickTableCell(table, 0, startColIdx, 2);
|
358 | 371 | waitForPass(() -> assertEquals(tb.addr(0x00400000), listing.getLocation().getAddress()));
|
|
0 commit comments