Class ExternalFunctionMerger

java.lang.Object
ghidra.app.merge.listing.ExternalFunctionMerger
All Implemented Interfaces:
ListingMergeConstants

public class ExternalFunctionMerger extends Object
Class for merging external function and label changes. This class can merge external function and label changes that were made to the checked out version. It can determine where there are conflicts between the latest checked in version and my checked out version. It can then allow the user to manually merge the conflicting functions and labels. External functions do not have bodies. However their signatures, stacks and variables do get merged. This class extends the AbstractFunctionMerger to handle merging of function changes when both My and Latest have changed functions.
Note: Externals are uniquely identified by symbol ID and the name (including namespace is also used to match externals when the external is transitioned from a label to a function and vice versa.
Important: This class is intended to be used only for a single program version merge. It should be constructed, followed by an autoMerge(), and lastly each external with a conflict should have mergeConflicts() called on it.
  • Field Details Link icon

    • EXTERNAL_NAMESPACE Link icon

      protected static final int EXTERNAL_NAMESPACE
      See Also:
    • EXTERNAL_LABEL Link icon

      protected static final int EXTERNAL_LABEL
      See Also:
    • EXTERNAL_ADDRESS Link icon

      protected static final int EXTERNAL_ADDRESS
      See Also:
    • EXTERNAL_SYMBOL_TYPE Link icon

      protected static final int EXTERNAL_SYMBOL_TYPE
      See Also:
    • EXTERNAL_DATA_TYPE Link icon

      protected static final int EXTERNAL_DATA_TYPE
      See Also:
    • EXTERNAL_FUNCTION Link icon

      protected static final int EXTERNAL_FUNCTION
      See Also:
    • HIGHEST_DETAIL_BIT_SHIFT Link icon

      protected static final int HIGHEST_DETAIL_BIT_SHIFT
      See Also:
    • ALL_EXTERNAL_DIFFERENCES Link icon

      protected static final int ALL_EXTERNAL_DIFFERENCES
      See Also:
    • KEEP_LATEST_ADD Link icon

      public static final int KEEP_LATEST_ADD
      Keep the external location added in LATEST to resolve a conflict.
      See Also:
    • KEEP_MY_ADD Link icon

      public static final int KEEP_MY_ADD
      Keep the external location added in MY to resolve a conflict.
      See Also:
    • KEEP_BOTH_ADDS Link icon

      public static final int KEEP_BOTH_ADDS
      Keep both of the external locations added in the LATEST and in MY when in conflict.
      See Also:
    • MERGE_BOTH_ADDS Link icon

      public static final int MERGE_BOTH_ADDS
      Merge both of the external locations added in the LATEST and in MY when in conflict.
      See Also:
    • KEEP_BOTH_BUTTON_NAME Link icon

      public static final String KEEP_BOTH_BUTTON_NAME
      See Also:
    • MERGE_BOTH_BUTTON_NAME Link icon

      public static final String MERGE_BOTH_BUTTON_NAME
      See Also:
    • externalDetailConflicts Link icon

      protected ObjectIntHashtable<Address> externalDetailConflicts
    • externalDataTypeConflicts Link icon

      protected AddressSet externalDataTypeConflicts
    • externalFunctionVersusDataTypeConflicts Link icon

      protected AddressSet externalFunctionVersusDataTypeConflicts
    • externalAddConflicts Link icon

      protected LongLongHashtable externalAddConflicts
    • totalChanges Link icon

      protected int totalChanges
    • changeNum Link icon

      protected int changeNum
    • externalFunctionRemovalChoice Link icon

      protected int externalFunctionRemovalChoice
    • externalFunctionChoice Link icon

      protected int externalFunctionChoice
    • externalDetailsChoice Link icon

      protected int externalDetailsChoice
    • externalDataTypeChoice Link icon

      protected int externalDataTypeChoice
    • externalFunctionVsDataTypeChoice Link icon

      protected int externalFunctionVsDataTypeChoice
    • externalAddChoice Link icon

      protected int externalAddChoice
    • externalRemoveChoice Link icon

      protected int externalRemoveChoice
    • BODY_CONFLICT_START Link icon

      protected static final int BODY_CONFLICT_START
      See Also:
    • BODY_CONFLICT_SIZE Link icon

      protected static final int BODY_CONFLICT_SIZE
      See Also:
    • FUNCTION_CONFLICT_START Link icon

      protected static final int FUNCTION_CONFLICT_START
      See Also:
    • FUNCTION_CONFLICT_SIZE Link icon

      protected static final int FUNCTION_CONFLICT_SIZE
      See Also:
    • DETAILS_CONFLICT_START Link icon

      protected static final int DETAILS_CONFLICT_START
      See Also:
    • DETAILS_CONFLICT_SIZE Link icon

      protected static final int DETAILS_CONFLICT_SIZE
      See Also:
    • FUNC_OVERLAP Link icon

      protected static final int FUNC_OVERLAP
      See Also:
    • FUNC_BODY Link icon

      protected static final int FUNC_BODY
      See Also:
    • FUNC_REMOVE Link icon

      protected static final int FUNC_REMOVE
      See Also:
    • FUNC_THUNK Link icon

      protected static final int FUNC_THUNK
      See Also:
    • FUNC_RETURN Link icon

      protected static final int FUNC_RETURN
      See Also:
    • FUNC_RETURN_ADDRESS_OFFSET Link icon

      protected static final int FUNC_RETURN_ADDRESS_OFFSET
      See Also:
    • FUNC_STACK_PURGE_SIZE Link icon

      protected static final int FUNC_STACK_PURGE_SIZE
      See Also:
    • FUNC_NAME Link icon

      protected static final int FUNC_NAME
      See Also:
    • FUNC_INLINE Link icon

      protected static final int FUNC_INLINE
      See Also:
    • FUNC_NO_RETURN Link icon

      protected static final int FUNC_NO_RETURN
      See Also:
    • FUNC_CALLING_CONVENTION Link icon

      protected static final int FUNC_CALLING_CONVENTION
      See Also:
    • FUNC_VAR_STORAGE Link icon

      protected static final int FUNC_VAR_STORAGE
      See Also:
    • FUNC_SIGNATURE Link icon

      protected static final int FUNC_SIGNATURE
      See Also:
    • FUNC_LOCAL_DETAILS Link icon

      protected static final int FUNC_LOCAL_DETAILS
      See Also:
    • FUNC_PARAM_DETAILS Link icon

      protected static final int FUNC_PARAM_DETAILS
      See Also:
    • FUNC_SIGNATURE_SOURCE Link icon

      protected static final int FUNC_SIGNATURE_SOURCE
      See Also:
    • FUNC_DETAIL_MASK Link icon

      protected static final int FUNC_DETAIL_MASK
      See Also:
    • VAR_NAME Link icon

      protected static final int VAR_NAME
      See Also:
    • VAR_DATATYPE Link icon

      protected static final int VAR_DATATYPE
      See Also:
    • VAR_COMMENT Link icon

      protected static final int VAR_COMMENT
      See Also:
    • VAR_REMOVED Link icon

      protected static final int VAR_REMOVED
      See Also:
    • RESULT Link icon

      protected static final int RESULT
      See Also:
    • LATEST Link icon

      protected static final int LATEST
      See Also:
    • MY Link icon

      protected static final int MY
      See Also:
    • ORIGINAL Link icon

      protected static final int ORIGINAL
      See Also:
    • ORIGINAL_VAR Link icon

      protected static final int ORIGINAL_VAR
      See Also:
    • LATEST_VAR Link icon

      protected static final int LATEST_VAR
      See Also:
    • MY_VAR Link icon

      protected static final int MY_VAR
      See Also:
    • errorBuf Link icon

      protected StringBuffer errorBuf
    • infoBuf Link icon

      protected StringBuffer infoBuf
    • mergeManager Link icon

      protected ProgramMultiUserMergeManager mergeManager
    • programs Link icon

      protected Program[] programs
    • functionManagers Link icon

      protected FunctionManager[] functionManagers
    • listingMergeManager Link icon

      protected ListingMergeManager listingMergeManager
    • resultAddressFactory Link icon

      protected AddressFactory resultAddressFactory
    • latestResolvedDts Link icon

      protected Map<Long,DataType> latestResolvedDts
    • myResolvedDts Link icon

      protected Map<Long,DataType> myResolvedDts
    • origResolvedDts Link icon

      protected Map<Long,DataType> origResolvedDts
    • listingMergePanel Link icon

      protected ListingMergePanel listingMergePanel
    • verticalConflictPanel Link icon

      protected VerticalChoicesPanel verticalConflictPanel
    • variousConflictPanel Link icon

      protected VariousChoicesPanel variousConflictPanel
    • scrollingListConflictPanel Link icon

      protected ScrollingListChoicesPanel scrollingListConflictPanel
    • currentConflictPanel Link icon

      protected ConflictPanel currentConflictPanel
    • currentMonitor Link icon

      protected TaskMonitor currentMonitor
    • overlapChoice Link icon

      protected int overlapChoice
    • bodyChoice Link icon

      protected int bodyChoice
    • functionReturnChoice Link icon

      protected int functionReturnChoice
    • removeChoice Link icon

      protected int removeChoice
    • detailsChoice Link icon

      protected int detailsChoice
    • variableStorageChoice Link icon

      protected int variableStorageChoice
    • parameterSignatureChoice Link icon

      protected int parameterSignatureChoice
    • parameterInfoChoice Link icon

      protected int parameterInfoChoice
    • removedLocalVariableChoice Link icon

      protected int removedLocalVariableChoice
    • localVariableDetailChoice Link icon

      protected int localVariableDetailChoice
    • thunkChoice Link icon

      protected int thunkChoice
    • funcConflicts Link icon

      protected ObjectIntHashtable<Address> funcConflicts
    • funcSet Link icon

      protected AddressSet funcSet
    • STORAGE_CONFLICT_CHOICES Link icon

      protected static final String[] STORAGE_CONFLICT_CHOICES
    • STORAGE_CONFLICT_HEADINGS Link icon

      protected static final String[] STORAGE_CONFLICT_HEADINGS
  • Constructor Details Link icon

    • ExternalFunctionMerger Link icon

      public ExternalFunctionMerger(ListingMergeManager listingMergeManager, boolean showListingPanel)
      Manages changes and conflicts for externals between the latest versioned program and the modified program being checked into version control.
      Parameters:
      listingMergeManager - the top level merge manager for merging a program version.
      showListingPanel - true to show the listing panel.
  • Method Details Link icon