GP-0: Fixed issue preventing placement of breakpoints with GDB

This commit is contained in:
Dan 2021-04-06 13:46:37 -04:00
parent 9f5c98fe14
commit 6398db9587

View File

@ -403,19 +403,15 @@ public class TraceObjectManager {
public void addBreakpointContainer(TargetObject added) {
TargetObject obj = findThreadOrProcess(added);
if (obj != null) {
ManagedBreakpointRecorder breakpointRecorder = recorder.breakpointRecorder;
if (obj instanceof TargetThread) {
ManagedBreakpointRecorder rec =
recorder.getThreadRecorderForSuccessor(added).getBreakpointRecorder();
rec.offerBreakpointContainer((TargetBreakpointSpecContainer) added);
return;
}
breakpointRecorder.offerBreakpointContainer((TargetBreakpointSpecContainer) added);
}
else {
Msg.error(this, "Error recording breakpoint container " + added);
// NB. obj can be null
ManagedBreakpointRecorder breakpointRecorder = recorder.breakpointRecorder;
if (obj instanceof TargetThread) {
ManagedBreakpointRecorder rec =
recorder.getThreadRecorderForSuccessor(added).getBreakpointRecorder();
rec.offerBreakpointContainer((TargetBreakpointSpecContainer) added);
return;
}
breakpointRecorder.offerBreakpointContainer((TargetBreakpointSpecContainer) added);
}
public void removeBreakpointContainer(TargetObject removed) {