mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 02:39:44 +02:00
debugger: follow on to GP-601, fix for Threads
This commit is contained in:
parent
25170eced2
commit
2d0743b785
3 changed files with 16 additions and 2 deletions
|
@ -52,7 +52,7 @@ public interface DbgModelTargetActiveScope extends DbgModelTargetObject, TargetA
|
|||
while (cur != null) {
|
||||
if (cur instanceof DbgModelSelectableObject) {
|
||||
DbgModelSelectableObject sel = (DbgModelSelectableObject) cur;
|
||||
System.err.println("requestActivation " + obj);
|
||||
//System.err.println("requestActivation " + obj);
|
||||
return sel.setActive();
|
||||
}
|
||||
if (cur instanceof DbgModelTargetObject) {
|
||||
|
|
|
@ -61,7 +61,7 @@ public interface DbgModelTargetFocusScope extends DbgModelTargetObject, TargetFo
|
|||
while (cur != null) {
|
||||
if (cur instanceof DbgModelSelectableObject) {
|
||||
DbgModelSelectableObject sel = (DbgModelSelectableObject) cur;
|
||||
System.err.println("requestFocus " + obj);
|
||||
//System.err.println("requestFocus " + obj);
|
||||
setFocus(sel);
|
||||
return AsyncUtils.NIL;
|
||||
}
|
||||
|
|
|
@ -117,6 +117,7 @@ public class TraceObjectManager {
|
|||
this::attributesChangedBreakpointLocation);
|
||||
putAttributesHandler(TargetRegister.class, this::attributesChangedRegister);
|
||||
putAttributesHandler(TargetStackFrame.class, this::attributesChangedStackFrame);
|
||||
putAttributesHandler(TargetThread.class, this::attributesChangedThread);
|
||||
|
||||
putRemHandler(TargetProcess.class, this::removeProcess);
|
||||
putRemHandler(TargetThread.class, this::removeThread);
|
||||
|
@ -515,6 +516,19 @@ public class TraceObjectManager {
|
|||
}
|
||||
}
|
||||
|
||||
public void attributesChangedThread(TargetObject thread, Map<String, ?> added) {
|
||||
if (added.containsKey(TargetObject.DISPLAY_ATTRIBUTE_NAME)) {
|
||||
ManagedThreadRecorder rec = recorder.getThreadRecorderForSuccessor(thread);
|
||||
if (rec != null) {
|
||||
String name = (String) added.get(TargetObject.DISPLAY_ATTRIBUTE_NAME);
|
||||
try (UndoableTransaction tid =
|
||||
UndoableTransaction.start(rec.getTrace(), "Renamed thread", true)) {
|
||||
rec.getTraceThread().setName(name);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void elementsChangedBreakpointLocationContainer(TargetObject locationContainer,
|
||||
Map<String, ?> added) {
|
||||
TargetObject x = findThreadOrProcess(locationContainer);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue