diff --git a/Ghidra/Debug/Debugger-api/src/main/java/ghidra/debug/api/target/Target.java b/Ghidra/Debug/Debugger-api/src/main/java/ghidra/debug/api/target/Target.java index 4064db3b44..68473599f2 100644 --- a/Ghidra/Debug/Debugger-api/src/main/java/ghidra/debug/api/target/Target.java +++ b/Ghidra/Debug/Debugger-api/src/main/java/ghidra/debug/api/target/Target.java @@ -700,4 +700,15 @@ public interface Target { * @return true if busy */ boolean isBusy(); + + /** + * Forcibly commit all of the back-ends transactions on this target's trace. + * + *
+ * This is generally not a recommended course of action, except that sometimes the back-end + * crashes and fails to close a transaction. It should only be invoked by a relatively hidden + * menu option, and mediated by a warning of some sort. Closing a transaction prematurely, when + * the back-end actually does still need it may cause a host of other problems. + */ + void forciblyCloseTransactions(); } diff --git a/Ghidra/Debug/Debugger-api/src/main/java/ghidra/debug/api/tracermi/TraceRmiConnection.java b/Ghidra/Debug/Debugger-api/src/main/java/ghidra/debug/api/tracermi/TraceRmiConnection.java index 8e0ad284ff..9afc226bf0 100644 --- a/Ghidra/Debug/Debugger-api/src/main/java/ghidra/debug/api/tracermi/TraceRmiConnection.java +++ b/Ghidra/Debug/Debugger-api/src/main/java/ghidra/debug/api/tracermi/TraceRmiConnection.java @@ -171,8 +171,19 @@ public interface TraceRmiConnection extends AutoCloseable { /** * Check if the given target has a transaction open * - * @param target + * @param target the target * @return true if busy */ boolean isBusy(Target target); + + /** + * Forcibly commit all transactions this connection has on the given trace + * + *
+ * This may cause undefined behavior in the back-end, especially if it still needs the + * transaction. + * + * @param target the the target + */ + void forciblyCloseTransactions(Target target); } diff --git a/Ghidra/Debug/Debugger-rmi-trace/src/main/help/help/topics/TraceRmiConnectionManagerPlugin/TraceRmiConnectionManagerPlugin.html b/Ghidra/Debug/Debugger-rmi-trace/src/main/help/help/topics/TraceRmiConnectionManagerPlugin/TraceRmiConnectionManagerPlugin.html index 9547a6a869..1462f39b71 100644 --- a/Ghidra/Debug/Debugger-rmi-trace/src/main/help/help/topics/TraceRmiConnectionManagerPlugin/TraceRmiConnectionManagerPlugin.html +++ b/Ghidra/Debug/Debugger-rmi-trace/src/main/help/help/topics/TraceRmiConnectionManagerPlugin/TraceRmiConnectionManagerPlugin.html @@ -105,5 +105,15 @@
Stop the server. This closes the persistent server. This does not affect pending acceptors or established connections.
+ +Forcibly close all the back-end's transactions on the target trace. This is generally not a + recommended course of action, except that sometimes the back-end crashes and fails to close a + transaction. Un-closed transactions from the back-end can leave most, if not all, of the UI in + a stale state, since event processing on the trace is disabled. If there is good reason to + believe the back-end has forgotten to close a transaction, this action will forcibly close all + of them and re-enable event processing. If, however, the back-end was in fact still doing work + with that transaction, it may crash and/or corrupt the connection.