Ghidra is a software reverse engineering (SRE) framework
GP-1393 minor name change GP-1393 addressing code review comments GP-1393 added columns for function attributes
James5f295cf53ead
diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/functionwindow/FunctionTableModel.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/functionwindow/FunctionTableModel.javaindex a4f10a06a4..18a4b0a777 100644--- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/functionwindow/FunctionTableModel.java+++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/functionwindow/FunctionTableModel.java@@ -62,6 +62,18 @@ public class FunctionTableModel extends AddressBasedTableModel<FunctionRowObject// Function tag column is not something widely used, so make hidden by defaultdescriptor.addHiddenColumn(DiscoverableTableUtils.adaptColumForModel(this, new FunctionTagTableColumn()));++ descriptor.addHiddenColumn(+ DiscoverableTableUtils.adaptColumForModel(this, new IsFunctionInlineTableColumn()));++ descriptor.addHiddenColumn(+ DiscoverableTableUtils.adaptColumForModel(this, new IsFunctionNonReturningTableColumn()));++ descriptor.addHiddenColumn(+ DiscoverableTableUtils.adaptColumForModel(this, new IsFunctionVarargsTableColumn()));++ descriptor.addHiddenColumn(+ DiscoverableTableUtils.adaptColumForModel(this, new IsFunctionCustomStorageTableColumn()));return descriptor;}diff --git a/Ghidra/Features/Base/src/main/java/ghidra/util/table/field/IsFunctionCustomStorageTableColumn.java b/Ghidra/Features/Base/src/main/java/ghidra/util/table/field/IsFunctionCustomStorageTableColumn.javanew file mode 100644index 0000000000..73e14fb933--- /dev/null+++ b/Ghidra/Features/Base/src/main/java/ghidra/util/table/field/IsFunctionCustomStorageTableColumn.java@@ -0,0 +1,37 @@+/* ###+ * IP: GHIDRA+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */+package ghidra.util.table.field;++import ghidra.docking.settings.Settings;+import ghidra.framework.plugintool.ServiceProvider;+import ghidra.program.model.listing.Function;+import ghidra.program.model.listing.Program;++public class IfFunctionCustomStorageTableColumn+ extends ProgramBasedDynamicTableColumnExtensionPoint<Function, Boolean> {++ @Override+ public String getColumnName() {+ return "Custom Storage";+ }++ @Override+ public Boolean getValue(Function rowObject, Settings settings, Program data,+ ServiceProvider serviceProvider) throws IllegalArgumentException {+ return rowObject.hasCustomVariableStorage();+ }++}diff --git a/Ghidra/Features/Base/src/main/java/ghidra/util/table/field/IsFunctionInlineTableColumn.java b/Ghidra/Features/Base/src/main/java/ghidra/util/table/field/IsFunctionInlineTableColumn.javanew file mode 100644index 0000000000..968c9aa5e2--- /dev/null+++ b/Ghidra/Features/Base/src/main/java/ghidra/util/table/field/IsFunctionInlineTableColumn.java@@ -0,0 +1,37 @@+/* ###+ * IP: GHIDRA+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */+package ghidra.util.table.field;++import ghidra.docking.settings.Settings;+import ghidra.framework.plugintool.ServiceProvider;+import ghidra.program.model.listing.Function;+import ghidra.program.model.listing.Program;++public class IsFunctionInlineTableColumn+ extends ProgramBasedDynamicTableColumnExtensionPoint<Function, Boolean> {++ @Override+ public String getColumnName() {+ return "Inline";+ }++ @Override+ public Boolean getValue(Function rowObject, Settings settings, Program data,+ ServiceProvider serviceProvider) throws IllegalArgumentException {+ return rowObject.isInline();+ }++}diff --git a/Ghidra/Features/Base/src/main/java/ghidra/util/table/field/IsFunctionNonReturningTableColumn.java b/Ghidra/Features/Base/src/main/java/ghidra/util/table/field/IsFunctionNonReturningTableColumn.javanew file mode 100644index 0000000000..e6ce24a77f--- /dev/null+++ b/Ghidra/Features/Base/src/main/java/ghidra/util/table/field/IsFunctionNonReturningTableColumn.java@@ -0,0 +1,37 @@+/* ###+ * IP: GHIDRA+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */+package ghidra.util.table.field;++import ghidra.docking.settings.Settings;+import ghidra.framework.plugintool.ServiceProvider;+import ghidra.program.model.listing.Function;+import ghidra.program.model.listing.Program;++public class IsFunctionNonReturningTableColumn+ extends ProgramBasedDynamicTableColumnExtensionPoint<Function, Boolean> {++ @Override+ public String getColumnName() {+ return "Non-returning";+ }++ @Override+ public Boolean getValue(Function rowObject, Settings settings, Program data,+ ServiceProvider serviceProvider) throws IllegalArgumentException {+ return rowObject.hasNoReturn();+ }++}diff --git a/Ghidra/Features/Base/src/main/java/ghidra/util/table/field/IsFunctionVarargsTableColumn.java b/Ghidra/Features/Base/src/main/java/ghidra/util/table/field/IsFunctionVarargsTableColumn.javanew file mode 100644index 0000000000..2449375b4d--- /dev/null+++ b/Ghidra/Features/Base/src/main/java/ghidra/util/table/field/IsFunctionVarargsTableColumn.java@@ -0,0 +1,37 @@+/* ###+ * IP: GHIDRA+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */+package ghidra.util.table.field;++import ghidra.docking.settings.Settings;+import ghidra.framework.plugintool.ServiceProvider;+import ghidra.program.model.listing.Function;+import ghidra.program.model.listing.Program;++public class IsFunctionVarargsTableColumn+ extends ProgramBasedDynamicTableColumnExtensionPoint<Function, Boolean>{++ @Override+ public String getColumnName() {+ return "Varargs";+ }++ @Override+ public Boolean getValue(Function rowObject, Settings settings, Program data,+ ServiceProvider serviceProvider) throws IllegalArgumentException {+ return rowObject.hasVarArgs();+ }++}