Skip to content

Commit 44dbcdc

Browse files
committed
Final minor tweaks for CodeCut 1.1 release
1 parent b1a348b commit 44dbcdc

9 files changed

Lines changed: 25 additions & 32 deletions

File tree

codecut-gui/src/main/java/codecutguiv2/CodeCutGUIPlugin.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,7 @@ public class CodeCutGUIPlugin extends Plugin implements DomainObjectListener {
121121
final static Cursor NORM_CURSOR = new Cursor(Cursor.DEFAULT_CURSOR);
122122

123123
private final static String OPTION_NAME_PYTHON_EXEC = "Python Executable";
124-
private final static String OPTION_DEFAULT_PYTHON_EXEC = "/projects/venv/bin/python3";
125-
//private final static String OPTION_DEFAULT_PYTHON_EXEC = "/usr/local/bin/python3"; // for testing
124+
private final static String OPTION_DEFAULT_PYTHON_EXEC = "/usr/bin/python3";
126125
private String pythonExec = OPTION_DEFAULT_PYTHON_EXEC;
127126

128127
private DockingAction openRefsAction;

codecut-gui/src/main/java/codecutguiv2/CodecutUtils.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,11 @@ public static List<Namespace> getAllNamespaces(Program program) {
186186
SymbolType type = symbol.getSymbolType();
187187
if (type == SymbolType.FUNCTION) {
188188
Namespace ns = ((Function)symbol.getObject()).getParentNamespace();
189-
if (!namespaceList.contains(ns)) {
190-
namespaceList.add(ns);
189+
//make sure it's a "real" namespace with a body - otherwise we can't work with it
190+
if ((ns.getBody().getMinAddress() != null) && (ns.getBody().getMaxAddress() != null)) {
191+
if (!namespaceList.contains(ns)) {
192+
namespaceList.add(ns);
193+
}
191194
}
192195
}
193196
}

codecut-gui/src/main/java/codecutguiv2/CombineProvider.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,12 @@ class CombineProvider extends ComponentProviderAdapter implements ActionListener
7979
private Namespace firstNamespace;
8080
private Namespace secondNamespace;
8181
private Namespace combinedNamespace;
82+
private SymbolProvider symProvider;
8283

8384
CombineProvider(CodeCutGUIPlugin plugin) {
8485
super(plugin.getTool(), "Combine Namespaces", plugin.getName(), ProgramActionContext.class);
8586
this.plugin = plugin;
87+
symProvider = plugin.getSymbolProvider();
8688

8789
setIcon(ICON);
8890
addToToolbar();
@@ -241,12 +243,12 @@ else if (nS == this.secondNamespace) {
241243

242244
}
243245
}
244-
245246
}
246247
}
247248

248249
this.closeComponent();
249250

251+
symProvider.reload();
250252

251253

252254
}

codecut-gui/src/main/java/codecutguiv2/CreateProvider.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,13 @@ class CreateProvider extends ComponentProviderAdapter implements ActionListener
7373

7474
private Namespace namespace;
7575
private Symbol symbol;
76+
private SymbolProvider symProvider;
7677

7778
CreateProvider(CodeCutGUIPlugin plugin) {
7879
super(plugin.getTool(), "Create Namespace", plugin.getName(), ProgramActionContext.class);
7980
this.plugin = plugin;
81+
82+
symProvider = plugin.getSymbolProvider();
8083

8184
setIcon(ICON);
8285
addToToolbar();
@@ -141,9 +144,10 @@ public void actionPerformed(ActionEvent e) {
141144
Msg.info(this, "Exception when attempting to change namespace of symbol "
142145
+ this.symbol.getName() + " to " + nS.getName());
143146
}
144-
147+
145148
this.closeComponent();
146149

150+
symProvider.reload();
147151
}
148152
}
149153

codecut-gui/src/main/java/codecutguiv2/NamespacePanel.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,12 @@ public int compare(Namespace ns1, Namespace ns2) {
123123

124124
Namespace ns = it.next();
125125
AddressSetView ar = ns.getBody();
126-
Msg.info(this, "Add: " + ns.getName() + " " + ar.getMinAddress().toString() + " " + ar.getMaxAddress().toString());
126+
if ((ar.getMinAddress() != null) && (ar.getMaxAddress() != null)) {
127+
Msg.info(this, "Add: " + ns.getName() + " " + ar.getMinAddress().toString() + " " + ar.getMaxAddress().toString());
128+
}
129+
else {
130+
Msg.info(this, "Add: " + ns.getName() + " null min or max??");
131+
}
127132
SymbolIterator symIter = this.program.getSymbolTable().getSymbols(ns);
128133
SymbolTableModel model = new SymbolTableModel(this.program, this.symProvider, this.tool, symIter, ns);
129134

codecut-gui/src/main/java/codecutguiv2/RenameProvider.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,12 @@ class RenameProvider extends ComponentProviderAdapter implements ActionListener
7373
private JButton button;
7474

7575
private Namespace namespace;
76+
private SymbolProvider symProvider;
7677

7778
RenameProvider(CodeCutGUIPlugin plugin) {
7879
super(plugin.getTool(), "Rename Namespace", plugin.getName(), ProgramActionContext.class);
7980
this.plugin = plugin;
81+
symProvider = plugin.getSymbolProvider();
8082

8183
setIcon(ICON);
8284
addToToolbar();
@@ -172,6 +174,7 @@ public void actionPerformed(ActionEvent e) {
172174
this.closeComponent();
173175
}
174176
}
177+
symProvider.reload();
175178
}
176179

177180
}

deepcut-ghidra/src/main/help/help/topics/deepcut/help.html

Lines changed: 0 additions & 23 deletions
This file was deleted.

deepcut-ghidra/src/main/java/deepcut/DeepCutAnalyzer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public class DeepCutAnalyzer extends AbstractAnalyzer {
5656

5757
private final static String OPTION_NAME_PYTHON_EXEC = "Python Executable";
5858
private final static String OPTION_DESCRIPTION_PYTHON_EXEC = "";
59-
private final static String OPTION_DEFAULT_PYTHON_EXEC = "/projects/venv/bin/python3";
59+
private final static String OPTION_DEFAULT_PYTHON_EXEC = "/usr/bin/python3";
6060
private String pythonExec = OPTION_DEFAULT_PYTHON_EXEC;
6161

6262
public DeepCutAnalyzer() {

deepcut-ghidra/src/main/java/deepcut/DeepCutPython.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public void startProcess() throws IOException {
5757

5858
process = runtime.exec(exec);
5959

60-
// Yes this is confusing. stdin is a Java OutputStream, stdin is an InputStream
60+
// Yes this is confusing. stdin is a Java OutputStream, stdout is an InputStream
6161
stdin = process.getOutputStream();
6262
stdout = process.getInputStream();
6363
stderr = process.getErrorStream();

0 commit comments

Comments
 (0)