mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 18:29:37 +02:00
GP-0: Trace recorder should only release trace once.
This commit is contained in:
parent
7f2675c9c1
commit
00b8e14f37
1 changed files with 8 additions and 5 deletions
|
@ -81,6 +81,7 @@ public class DefaultTraceRecorder implements TraceRecorder {
|
||||||
|
|
||||||
public DefaultTraceRecorder(DebuggerModelServicePlugin plugin, Trace trace, TargetObject target,
|
public DefaultTraceRecorder(DebuggerModelServicePlugin plugin, Trace trace, TargetObject target,
|
||||||
DefaultDebuggerTargetTraceMapper mapper) {
|
DefaultDebuggerTargetTraceMapper mapper) {
|
||||||
|
trace.addConsumer(this);
|
||||||
this.plugin = plugin;
|
this.plugin = plugin;
|
||||||
this.tool = plugin.getTool();
|
this.tool = plugin.getTool();
|
||||||
this.trace = trace;
|
this.trace = trace;
|
||||||
|
@ -99,9 +100,6 @@ public class DefaultTraceRecorder implements TraceRecorder {
|
||||||
this.symbolRecorder = new DefaultSymbolRecorder(this);
|
this.symbolRecorder = new DefaultSymbolRecorder(this);
|
||||||
this.timeRecorder = new DefaultTimeRecorder(this);
|
this.timeRecorder = new DefaultTimeRecorder(this);
|
||||||
this.objectManager = new TraceObjectManager(target, mapper, this);
|
this.objectManager = new TraceObjectManager(target, mapper, this);
|
||||||
|
|
||||||
trace.addConsumer(this);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*---------------- OBJECT MANAGER METHODS -------------------*/
|
/*---------------- OBJECT MANAGER METHODS -------------------*/
|
||||||
|
@ -358,9 +356,14 @@ public class DefaultTraceRecorder implements TraceRecorder {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void invalidate() {
|
protected void invalidate() {
|
||||||
valid = false;
|
|
||||||
objectManager.disposeModelListeners();
|
objectManager.disposeModelListeners();
|
||||||
trace.release(this);
|
synchronized (this) {
|
||||||
|
if (!valid) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
valid = false;
|
||||||
|
trace.release(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*---------------- FOCUS-SUPPORT METHODS -------------------*/
|
/*---------------- FOCUS-SUPPORT METHODS -------------------*/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue