Skip to content

Ghidra is a software reverse engineering (SRE) framework

GP-859: Objects subtitle includes connection brief.

d-millar2891486a2a6a
diff --git a/Ghidra/Debug/Debugger-agent-dbgeng/src/main/java/agent/dbgeng/model/impl/DbgModelImpl.java b/Ghidra/Debug/Debugger-agent-dbgeng/src/main/java/agent/dbgeng/model/impl/DbgModelImpl.java
index 14b80d8bb4..b05703ca08 100644
--- a/Ghidra/Debug/Debugger-agent-dbgeng/src/main/java/agent/dbgeng/model/impl/DbgModelImpl.java
+++ b/Ghidra/Debug/Debugger-agent-dbgeng/src/main/java/agent/dbgeng/model/impl/DbgModelImpl.java
@@ -74,6 +74,11 @@ public class DbgModelImpl extends AbstractDbgModel implements DebuggerObjectMode
addModelRoot(root);
}
+ @Override
+ public String getBrief() {
+ return "DBGENG@" + Integer.toHexString(System.identityHashCode(this));
+ }
+
@Override
public AddressSpace getAddressSpace(String name) {
if (!SPACE_NAME.equals(name)) {
diff --git a/Ghidra/Debug/Debugger-agent-dbgmodel/src/main/java/agent/dbgmodel/model/impl/DbgModel2Impl.java b/Ghidra/Debug/Debugger-agent-dbgmodel/src/main/java/agent/dbgmodel/model/impl/DbgModel2Impl.java
index f11ab04889..9b708f990b 100644
--- a/Ghidra/Debug/Debugger-agent-dbgmodel/src/main/java/agent/dbgmodel/model/impl/DbgModel2Impl.java
+++ b/Ghidra/Debug/Debugger-agent-dbgmodel/src/main/java/agent/dbgmodel/model/impl/DbgModel2Impl.java
@@ -89,6 +89,11 @@ public class DbgModel2Impl extends AbstractDbgModel
(DbgModelTargetObject) delegate, mixins, DelegateDbgModel2TargetObject.LOOKUP);
}
+ @Override
+ public String getBrief() {
+ return "DBGMODEL@" + Integer.toHexString(System.identityHashCode(this));
+ }
+
@Override
public AddressSpace getAddressSpace(String name) {
if (!SPACE_NAME.equals(name)) {
diff --git a/Ghidra/Debug/Debugger-agent-gdb/src/main/java/agent/gdb/model/impl/GdbModelImpl.java b/Ghidra/Debug/Debugger-agent-gdb/src/main/java/agent/gdb/model/impl/GdbModelImpl.java
index b3ac42854d..19d39be1b4 100644
--- a/Ghidra/Debug/Debugger-agent-gdb/src/main/java/agent/gdb/model/impl/GdbModelImpl.java
+++ b/Ghidra/Debug/Debugger-agent-gdb/src/main/java/agent/gdb/model/impl/GdbModelImpl.java
@@ -83,6 +83,11 @@ public class GdbModelImpl extends AbstractDebuggerObjectModel {
return ROOT_SCHEMA;
}
+ @Override
+ public String getBrief() {
+ return "GDB@" + Integer.toHexString(System.identityHashCode(this));
+ }
+
@Override
public AddressSpace getAddressSpace(String name) {
if (!SPACE_NAME.equals(name)) {
diff --git a/Ghidra/Debug/Debugger-jpda/src/main/java/ghidra/dbg/jdi/model/JdiModelImpl.java b/Ghidra/Debug/Debugger-jpda/src/main/java/ghidra/dbg/jdi/model/JdiModelImpl.java
index a97380a23e..18ea4455a5 100644
--- a/Ghidra/Debug/Debugger-jpda/src/main/java/ghidra/dbg/jdi/model/JdiModelImpl.java
+++ b/Ghidra/Debug/Debugger-jpda/src/main/java/ghidra/dbg/jdi/model/JdiModelImpl.java
@@ -71,6 +71,11 @@ public class JdiModelImpl extends AbstractDebuggerObjectModel {
return completedRoot;
}
+ @Override
+ public String getBrief() {
+ return "JDI@" + Integer.toHexString(System.identityHashCode(this));
+ }
+
@Override
public AddressSpace getAddressSpace(String name) {
switch (name) {
diff --git a/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/objects/DebuggerObjectsProvider.java b/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/objects/DebuggerObjectsProvider.java
index ec51f76f74..c93ef5ba91 100644
--- a/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/objects/DebuggerObjectsProvider.java
+++ b/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/gui/objects/DebuggerObjectsProvider.java
@@ -109,70 +109,70 @@ public class DebuggerObjectsProvider extends ComponentProviderAdapter
public static final String OPTION_NAME_DEFAULT_BACKGROUND_COLOR = "Object Colors.Background";
@AutoOptionDefined( //
- name = OPTION_NAME_DEFAULT_FOREGROUND_COLOR, //
- description = "The default foreground color of items in the objects tree", //
- help = @HelpInfo(anchor = "colors") //
+ name = OPTION_NAME_DEFAULT_FOREGROUND_COLOR, //
+ description = "The default foreground color of items in the objects tree", //
+ help = @HelpInfo(anchor = "colors") //
)
Color defaultForegroundColor = Color.BLACK;
@AutoOptionDefined( //
- name = OPTION_NAME_DEFAULT_BACKGROUND_COLOR, //
- description = "The default background color of items in the objects tree", //
- help = @HelpInfo(anchor = "colors") //
+ name = OPTION_NAME_DEFAULT_BACKGROUND_COLOR, //
+ description = "The default background color of items in the objects tree", //
+ help = @HelpInfo(anchor = "colors") //
)
Color defaultBackgroundColor = Color.WHITE;
@AutoOptionDefined( //
- name = OPTION_NAME_INVISIBLE_FOREGROUND_COLOR, //
- description = "The foreground color for items normally not visible (toggleable)", //
- help = @HelpInfo(anchor = "colors") //
+ name = OPTION_NAME_INVISIBLE_FOREGROUND_COLOR, //
+ description = "The foreground color for items normally not visible (toggleable)", //
+ help = @HelpInfo(anchor = "colors") //
)
Color invisibleForegroundColor = Color.LIGHT_GRAY;
@AutoOptionDefined( //
- name = OPTION_NAME_MODIFIED_FOREGROUND_COLOR, //
- description = "The foreground color for modified items in the objects tree", //
- help = @HelpInfo(anchor = "colors") //
+ name = OPTION_NAME_MODIFIED_FOREGROUND_COLOR, //
+ description = "The foreground color for modified items in the objects tree", //
+ help = @HelpInfo(anchor = "colors") //
)
Color modifiedForegroundColor = Color.RED;
@AutoOptionDefined( //
- name = OPTION_NAME_SUBSCRIBED_FOREGROUND_COLOR, //
- description = "The foreground color for subscribed items in the objects tree", //
- help = @HelpInfo(anchor = "colors") //
+ name = OPTION_NAME_SUBSCRIBED_FOREGROUND_COLOR, //
+ description = "The foreground color for subscribed items in the objects tree", //
+ help = @HelpInfo(anchor = "colors") //
)
Color subscribedForegroundColor = Color.BLACK;
@AutoOptionDefined( //
- name = OPTION_NAME_ERROR_FOREGROUND_COLOR, //
- description = "The foreground color for items in error", //
- help = @HelpInfo(anchor = "colors") //
+ name = OPTION_NAME_ERROR_FOREGROUND_COLOR, //
+ description = "The foreground color for items in error", //
+ help = @HelpInfo(anchor = "colors") //
)
Color errorForegroundColor = Color.RED;
@AutoOptionDefined( //
- name = OPTION_NAME_INTRINSIC_FOREGROUND_COLOR, //
- description = "The foreground color for intrinsic items in the objects tree", //
- help = @HelpInfo(anchor = "colors") //
+ name = OPTION_NAME_INTRINSIC_FOREGROUND_COLOR, //
+ description = "The foreground color for intrinsic items in the objects tree", //
+ help = @HelpInfo(anchor = "colors") //
)
Color intrinsicForegroundColor = Color.BLUE;
@AutoOptionDefined( //
- name = OPTION_NAME_TARGET_FOREGROUND_COLOR, //
- description = "The foreground color for target object items in the objects tree", //
- help = @HelpInfo(anchor = "colors") //
+ name = OPTION_NAME_TARGET_FOREGROUND_COLOR, //
+ description = "The foreground color for target object items in the objects tree", //
+ help = @HelpInfo(anchor = "colors") //
)
Color targetForegroundColor = Color.MAGENTA;
@AutoOptionDefined( //
- name = OPTION_NAME_ACCESSOR_FOREGROUND_COLOR, //
- description = "The foreground color for property accessor items in the objects tree", //
- help = @HelpInfo(anchor = "colors") //
+ name = OPTION_NAME_ACCESSOR_FOREGROUND_COLOR, //
+ description = "The foreground color for property accessor items in the objects tree", //
+ help = @HelpInfo(anchor = "colors") //
)
Color accessorForegroundColor = Color.LIGHT_GRAY;
@AutoOptionDefined( //
- name = OPTION_NAME_LINK_FOREGROUND_COLOR, //
- description = "The foreground color for links to items in the objects tree", //
- help = @HelpInfo(anchor = "colors") //
+ name = OPTION_NAME_LINK_FOREGROUND_COLOR, //
+ description = "The foreground color for links to items in the objects tree", //
+ help = @HelpInfo(anchor = "colors") //
)
Color linkForegroundColor = Color.GREEN.darker();
@AutoOptionDefined( //
- name = "Default Extended Step", //
- description = "The default string for the extended step command" //
+ name = "Default Extended Step", //
+ description = "The default string for the extended step command" //
//help = @HelpInfo(anchor = "colors") //
)
String extendedStep = "";
@@ -486,16 +486,19 @@ public class DebuggerObjectsProvider extends ComponentProviderAdapter
if (model != null && model.equals(currentModel)) {
this.requestFocus(); // COMPONENT
this.toFront();
+ setSubTitle(currentModel.getBrief());
}
}
// TODO: These events aren't being called anymore
// TraceActivatedEvents now carry complete "coordinates" (trace,thread,snap,frame,etc.)
public void traceActivated(DebuggerCoordinates coordinates) {
+
if (currentTrace == coordinates.getTrace()) {
return;
}
setTrace(coordinates.getTrace(), coordinates.getThread(), true);
+
}
public void setTrace(Trace trace, TraceThread thread, boolean select) {