diff --git a/Ghidra/Features/Base/src/main/help/help/topics/FunctionComparison/FunctionComparison.htm b/Ghidra/Features/Base/src/main/help/help/topics/FunctionComparison/FunctionComparison.htm index b211f66635..420ff2d108 100644 --- a/Ghidra/Features/Base/src/main/help/help/topics/FunctionComparison/FunctionComparison.htm +++ b/Ghidra/Features/Base/src/main/help/help/topics/FunctionComparison/FunctionComparison.htm @@ -8,7 +8,8 @@
-+ +diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/context/ProgramLocationActionContext.java b/Ghidra/Features/Base/src/main/java/ghidra/app/context/ProgramLocationActionContext.java index 0038465489..0f89d4738d 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/context/ProgramLocationActionContext.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/context/ProgramLocationActionContext.java @@ -4,9 +4,9 @@ * 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. @@ -125,10 +125,14 @@ public class ProgramLocationActionContext extends ProgramActionContext } private Function getFunctionForLocation() { - if (!(location instanceof FunctionLocation functionLocation)) { - return null; + if (location instanceof FunctionLocation functionLocation) { + Address functionAddress = functionLocation.getFunctionAddress(); + return program.getFunctionManager().getFunctionAt(functionAddress); } - Address functionAddress = functionLocation.getFunctionAddress(); - return program.getFunctionManager().getFunctionAt(functionAddress); + Address address = getAddress(); + if (address != null) { + return program.getFunctionManager().getFunctionContaining(address); + } + return null; } } diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/datamgr/archive/DataTypeIndexer.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/datamgr/archive/DataTypeIndexer.java index b486d2996e..12cecfef57 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/datamgr/archive/DataTypeIndexer.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/datamgr/archive/DataTypeIndexer.java @@ -119,31 +119,37 @@ public class DataTypeIndexer { // which depended on how the binary search traversed the list. If there is a reason to use that // comparator over this one, then we need to re-think how this list is sorted. private class CaseInsensitiveDataTypeComparator implements ComparatorTo Compare Functions, select one or more functions from the Listing, Decompiler or the + Functions Table, then + right-click and select the Compare Functions(s) action (In the Listing, it is + Function
Compare Function(s)). -
To begin, select a function (or multiple functions) from the listing or - the function table. - Then right-click and select the Compare Selected Functions option.
+ +-
If an existing function comparison window is + already showing, the Compare Function(s) action will add the selected functions to + the existing comparison. To get a new Function Comparison window, use the + Compare in New Window action instead.
A new function comparison window will appear (subsequent - invocations of this option will create a new tab in the existing window).
- -- -
Additional functions can be added to the - last comparison window using the Add To Last Comparison popup action that will - appear on components that can supply one or more functions. (Currently supported in the Listing - and the Functions Window.) -