diff --git a/codecut-gui/src/main/java/codecutguiv2/CodeCutGUIPlugin.java b/codecut-gui/src/main/java/codecutguiv2/CodeCutGUIPlugin.java index f60273f..0989d4b 100644 --- a/codecut-gui/src/main/java/codecutguiv2/CodeCutGUIPlugin.java +++ b/codecut-gui/src/main/java/codecutguiv2/CodeCutGUIPlugin.java @@ -121,8 +121,7 @@ public class CodeCutGUIPlugin extends Plugin implements DomainObjectListener { final static Cursor NORM_CURSOR = new Cursor(Cursor.DEFAULT_CURSOR); private final static String OPTION_NAME_PYTHON_EXEC = "Python Executable"; - private final static String OPTION_DEFAULT_PYTHON_EXEC = "/projects/venv/bin/python3"; - //private final static String OPTION_DEFAULT_PYTHON_EXEC = "/usr/local/bin/python3"; // for testing + private final static String OPTION_DEFAULT_PYTHON_EXEC = "/usr/bin/python3"; private String pythonExec = OPTION_DEFAULT_PYTHON_EXEC; private DockingAction openRefsAction; diff --git a/codecut-gui/src/main/java/codecutguiv2/CodecutUtils.java b/codecut-gui/src/main/java/codecutguiv2/CodecutUtils.java index ae0f3a6..b522fcb 100644 --- a/codecut-gui/src/main/java/codecutguiv2/CodecutUtils.java +++ b/codecut-gui/src/main/java/codecutguiv2/CodecutUtils.java @@ -186,8 +186,11 @@ public static List getAllNamespaces(Program program) { SymbolType type = symbol.getSymbolType(); if (type == SymbolType.FUNCTION) { Namespace ns = ((Function)symbol.getObject()).getParentNamespace(); - if (!namespaceList.contains(ns)) { - namespaceList.add(ns); + //make sure it's a "real" namespace with a body - otherwise we can't work with it + if ((ns.getBody().getMinAddress() != null) && (ns.getBody().getMaxAddress() != null)) { + if (!namespaceList.contains(ns)) { + namespaceList.add(ns); + } } } } diff --git a/codecut-gui/src/main/java/codecutguiv2/CombineProvider.java b/codecut-gui/src/main/java/codecutguiv2/CombineProvider.java index 8540125..4efb998 100644 --- a/codecut-gui/src/main/java/codecutguiv2/CombineProvider.java +++ b/codecut-gui/src/main/java/codecutguiv2/CombineProvider.java @@ -79,10 +79,12 @@ class CombineProvider extends ComponentProviderAdapter implements ActionListener private Namespace firstNamespace; private Namespace secondNamespace; private Namespace combinedNamespace; + private SymbolProvider symProvider; CombineProvider(CodeCutGUIPlugin plugin) { super(plugin.getTool(), "Combine Namespaces", plugin.getName(), ProgramActionContext.class); this.plugin = plugin; + symProvider = plugin.getSymbolProvider(); setIcon(ICON); addToToolbar(); @@ -241,12 +243,12 @@ else if (nS == this.secondNamespace) { } } - } } this.closeComponent(); + symProvider.reload(); } diff --git a/codecut-gui/src/main/java/codecutguiv2/CreateProvider.java b/codecut-gui/src/main/java/codecutguiv2/CreateProvider.java index 8fc0a36..57c5f8b 100644 --- a/codecut-gui/src/main/java/codecutguiv2/CreateProvider.java +++ b/codecut-gui/src/main/java/codecutguiv2/CreateProvider.java @@ -73,10 +73,13 @@ class CreateProvider extends ComponentProviderAdapter implements ActionListener private Namespace namespace; private Symbol symbol; + private SymbolProvider symProvider; CreateProvider(CodeCutGUIPlugin plugin) { super(plugin.getTool(), "Create Namespace", plugin.getName(), ProgramActionContext.class); this.plugin = plugin; + + symProvider = plugin.getSymbolProvider(); setIcon(ICON); addToToolbar(); @@ -141,9 +144,10 @@ public void actionPerformed(ActionEvent e) { Msg.info(this, "Exception when attempting to change namespace of symbol " + this.symbol.getName() + " to " + nS.getName()); } - + this.closeComponent(); + symProvider.reload(); } } diff --git a/codecut-gui/src/main/java/codecutguiv2/NamespacePanel.java b/codecut-gui/src/main/java/codecutguiv2/NamespacePanel.java index f8c645e..0b3cbd1 100644 --- a/codecut-gui/src/main/java/codecutguiv2/NamespacePanel.java +++ b/codecut-gui/src/main/java/codecutguiv2/NamespacePanel.java @@ -123,7 +123,12 @@ public int compare(Namespace ns1, Namespace ns2) { Namespace ns = it.next(); AddressSetView ar = ns.getBody(); - Msg.info(this, "Add: " + ns.getName() + " " + ar.getMinAddress().toString() + " " + ar.getMaxAddress().toString()); + if ((ar.getMinAddress() != null) && (ar.getMaxAddress() != null)) { + Msg.info(this, "Add: " + ns.getName() + " " + ar.getMinAddress().toString() + " " + ar.getMaxAddress().toString()); + } + else { + Msg.info(this, "Add: " + ns.getName() + " null min or max??"); + } SymbolIterator symIter = this.program.getSymbolTable().getSymbols(ns); SymbolTableModel model = new SymbolTableModel(this.program, this.symProvider, this.tool, symIter, ns); diff --git a/codecut-gui/src/main/java/codecutguiv2/RenameProvider.java b/codecut-gui/src/main/java/codecutguiv2/RenameProvider.java index 89b7d29..5a877d5 100644 --- a/codecut-gui/src/main/java/codecutguiv2/RenameProvider.java +++ b/codecut-gui/src/main/java/codecutguiv2/RenameProvider.java @@ -73,10 +73,12 @@ class RenameProvider extends ComponentProviderAdapter implements ActionListener private JButton button; private Namespace namespace; + private SymbolProvider symProvider; RenameProvider(CodeCutGUIPlugin plugin) { super(plugin.getTool(), "Rename Namespace", plugin.getName(), ProgramActionContext.class); this.plugin = plugin; + symProvider = plugin.getSymbolProvider(); setIcon(ICON); addToToolbar(); @@ -172,6 +174,7 @@ public void actionPerformed(ActionEvent e) { this.closeComponent(); } } + symProvider.reload(); } } diff --git a/deepcut-ghidra/src/main/help/help/topics/deepcut/help.html b/deepcut-ghidra/src/main/help/help/topics/deepcut/help.html deleted file mode 100644 index 8f858d2..0000000 --- a/deepcut-ghidra/src/main/help/help/topics/deepcut/help.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - Skeleton Help File for a Module - - - - -

Skeleton Help File for a Module

- -

This is a simple skeleton help topic. For a better description of what should and should not - go in here, see the "sample" Ghidra extension in the Extensions/Ghidra directory, or see your - favorite help topic. In general, language modules do not have their own help topics.

- - diff --git a/deepcut-ghidra/src/main/java/deepcut/DeepCutAnalyzer.java b/deepcut-ghidra/src/main/java/deepcut/DeepCutAnalyzer.java index 2c84bc5..db2ae73 100644 --- a/deepcut-ghidra/src/main/java/deepcut/DeepCutAnalyzer.java +++ b/deepcut-ghidra/src/main/java/deepcut/DeepCutAnalyzer.java @@ -56,7 +56,7 @@ public class DeepCutAnalyzer extends AbstractAnalyzer { private final static String OPTION_NAME_PYTHON_EXEC = "Python Executable"; private final static String OPTION_DESCRIPTION_PYTHON_EXEC = ""; - private final static String OPTION_DEFAULT_PYTHON_EXEC = "/projects/venv/bin/python3"; + private final static String OPTION_DEFAULT_PYTHON_EXEC = "/usr/bin/python3"; private String pythonExec = OPTION_DEFAULT_PYTHON_EXEC; public DeepCutAnalyzer() { diff --git a/deepcut-ghidra/src/main/java/deepcut/DeepCutPython.java b/deepcut-ghidra/src/main/java/deepcut/DeepCutPython.java index cdd3fcc..d6ee885 100644 --- a/deepcut-ghidra/src/main/java/deepcut/DeepCutPython.java +++ b/deepcut-ghidra/src/main/java/deepcut/DeepCutPython.java @@ -57,7 +57,7 @@ public void startProcess() throws IOException { process = runtime.exec(exec); - // Yes this is confusing. stdin is a Java OutputStream, stdin is an InputStream + // Yes this is confusing. stdin is a Java OutputStream, stdout is an InputStream stdin = process.getOutputStream(); stdout = process.getInputStream(); stderr = process.getErrorStream();