mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-06-01 04:15:22 +08:00
Merge remote-tracking branch 'origin/Ghidra_11.3'
This commit is contained in:
@@ -269,16 +269,6 @@ def refresh_available(node: sch.Schema('AvailableContainer')):
|
||||
exec_convert_errors('ghidra trace put-available')
|
||||
|
||||
|
||||
@REGISTRY.method(action='refresh', display="Refresh Breakpoints")
|
||||
def refresh_breakpoints(node: sch.Schema('BreakpointContainer')):
|
||||
"""
|
||||
Refresh the list of breakpoints (including locations for the current
|
||||
process).
|
||||
"""
|
||||
with commands.open_tracked_tx('Refresh Breakpoints'):
|
||||
exec_convert_errors('ghidra trace put-breakpoints')
|
||||
|
||||
|
||||
@REGISTRY.method(action='refresh', display="Refresh Processes")
|
||||
def refresh_processes(node: sch.Schema('ProcessContainer')):
|
||||
"""Refresh the list of processes."""
|
||||
|
||||
+3
-3
@@ -4,9 +4,9 @@
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@@ -171,7 +171,7 @@ public class ColumnFilterData<T> implements Comparable<ColumnFilterData<T>> {
|
||||
//@formatter:off
|
||||
return "{\n" +
|
||||
"\tname: " + name + ",\n" +
|
||||
"\tmodelColumn" + modelIndex + ",\n" +
|
||||
"\tmodelColumn: " + modelIndex + ",\n" +
|
||||
"\tviewColumn: " + viewIndex + ",\n" +
|
||||
"\tconstraints: " +
|
||||
CollectionUtils.collect(applicableConstraints, c -> c.asString()) +"\n" +
|
||||
|
||||
+7
-3
@@ -4,9 +4,9 @@
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@@ -317,8 +317,12 @@ public class ColumnFilterDialog<R> extends ReusableDialogComponentProvider
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void dialogClosed() {
|
||||
public void dispose() {
|
||||
dialogModel.dispose();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void dialogClosed() {
|
||||
if (closeCallback != null) {
|
||||
closeCallback.call();
|
||||
}
|
||||
|
||||
+4
-3
@@ -4,9 +4,9 @@
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@@ -165,7 +165,8 @@ public class DialogFilterCondition<T> {
|
||||
//@formatter:off
|
||||
return "{\n" +
|
||||
"\tname: " + constraintName + ",\n" +
|
||||
"\tparent: " + parent + "\n" +
|
||||
"\teditor: " + editor + "\n" +
|
||||
// "\tparent: " + parent + "\n" + // stack overflow when DialogFilterConditionSet.toString() is called
|
||||
"}";
|
||||
//@formatter:on
|
||||
}
|
||||
|
||||
+3
-3
@@ -4,9 +4,9 @@
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@@ -170,7 +170,7 @@ public class DialogFilterConditionSet<T> {
|
||||
public String toString() {
|
||||
//@formatter:off
|
||||
return "{\n" +
|
||||
"\tfilterRow: " + filterRow + ",\n" +
|
||||
// "\tfilterRow: " + filterRow + ",\n" + // stack overflow when DialogFilterRow.toString() is called
|
||||
"\tdata: " + columnFilterData + ",\n" +
|
||||
"\tconditions: " + conditionSet +"\n" +
|
||||
"}";
|
||||
|
||||
+8
-2
@@ -4,9 +4,9 @@
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@@ -21,6 +21,7 @@ import javax.swing.event.ChangeListener;
|
||||
|
||||
import docking.widgets.table.constraint.ColumnConstraint;
|
||||
import docking.widgets.table.constraint.MappedColumnConstraint;
|
||||
import generic.json.Json;
|
||||
|
||||
/**
|
||||
* A constraint editor that supports object type conversions, wrapping the editor for the
|
||||
@@ -105,4 +106,9 @@ public class MappedColumnConstraintEditor<T, M> implements ColumnConstraintEdito
|
||||
public void removeChangeListener(ChangeListener constraintEditorChangeListener) {
|
||||
delegateEditor.addChangeListener(constraintEditorChangeListener);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Json.toString(this);
|
||||
}
|
||||
}
|
||||
|
||||
+5
-43
@@ -15,9 +15,10 @@
|
||||
*/
|
||||
package agent.lldb.rmi;
|
||||
|
||||
import static org.hamcrest.Matchers.*;
|
||||
import static org.hamcrest.Matchers.containsString;
|
||||
import static org.hamcrest.Matchers.greaterThan;
|
||||
import static org.junit.Assert.*;
|
||||
import static org.junit.Assume.*;
|
||||
import static org.junit.Assume.assumeTrue;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
@@ -92,45 +93,6 @@ public class LldbMethodsTest extends AbstractLldbTraceRmiTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testRefreshBreakpoints() throws Exception {
|
||||
try (LldbAndConnection conn = startAndConnectLldb()) {
|
||||
start(conn, getSpecimenPrint());
|
||||
txPut(conn, "processes");
|
||||
|
||||
RemoteMethod refreshBreakpoints = conn.getMethod("refresh_breakpoints");
|
||||
try (ManagedDomainObject mdo = openDomainObject("/New Traces/lldb/expPrint")) {
|
||||
tb = new ToyDBTraceBuilder((Trace) mdo.get());
|
||||
//waitStopped(conn);
|
||||
|
||||
conn.execute("breakpoint set --name main");
|
||||
conn.execute("breakpoint set -H --name main");
|
||||
txPut(conn, "breakpoints");
|
||||
TraceObject breakpoints = Objects.requireNonNull(tb.objAny0("Breakpoints"));
|
||||
refreshBreakpoints.invoke(Map.of("node", breakpoints));
|
||||
|
||||
List<TraceObjectValue> procBreakLocVals = tb.trace.getObjectManager()
|
||||
.getValuePaths(Lifespan.at(0),
|
||||
PathFilter.parse("Processes[].Breakpoints[]"))
|
||||
.map(p -> p.getLastEntry())
|
||||
.sorted(Comparator.comparing(TraceObjectValue::getEntryKey))
|
||||
.toList();
|
||||
assertEquals(2, procBreakLocVals.size());
|
||||
AddressRange rangeMain =
|
||||
procBreakLocVals.get(0).getChild().getValue(0, "_range").castValue();
|
||||
Address main = rangeMain.getMinAddress();
|
||||
|
||||
// The temporary breakpoint uses up number 1
|
||||
assertBreakLoc(procBreakLocVals.get(0), "[1.1]", main, 1,
|
||||
Set.of(TraceBreakpointKind.SW_EXECUTE),
|
||||
"main");
|
||||
assertBreakLoc(procBreakLocVals.get(1), "[2.1]", main, 1,
|
||||
Set.of(TraceBreakpointKind.HW_EXECUTE),
|
||||
"main");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testRefreshProcBreakpoints() throws Exception {
|
||||
try (LldbAndConnection conn = startAndConnectLldb()) {
|
||||
@@ -151,9 +113,9 @@ public class LldbMethodsTest extends AbstractLldbTraceRmiTest {
|
||||
|
||||
List<TraceObjectValue> procBreakLocVals = tb.trace.getObjectManager()
|
||||
.getValuePaths(Lifespan.at(0),
|
||||
PathFilter.parse("Processes[].Breakpoints[][1]"))
|
||||
PathFilter.parse("Processes[].Breakpoints[][]"))
|
||||
.map(p -> p.getLastEntry())
|
||||
.sorted(Comparator.comparing(TraceObjectValue::getEntryKey))
|
||||
.sorted(Comparator.comparing(TraceObjectValue::getCanonicalPath))
|
||||
.toList();
|
||||
assertEquals(2, procBreakLocVals.size());
|
||||
AddressRange rangeMain =
|
||||
|
||||
Reference in New Issue
Block a user