diff --git a/include/zipr_plugin.h b/include/zipr_plugin.h index 480386c18d63d921d52a55be401e67355b1cefd5..5c849687adf5e8eb672e570d0e04b5ee8b4b73b0 100644 --- a/include/zipr_plugin.h +++ b/include/zipr_plugin.h @@ -45,14 +45,19 @@ class ZiprPluginInterface_t return 0; } /* - * InsnPaddingSize() + * DollopEntryOpeningSize() + * DollopEntryClosingSize() * * A plugin that wants to put padding into a * dollop entry before/after an instruction - * should return the size of that padding in this - * function. + * should return the size of that padding in + * these functions. */ - virtual size_t InsnPaddingSize(libIRDB::Instruction_t*, Zipr_t *) + virtual size_t DollopEntryOpeningSize(DollopEntry_t*, Zipr_t *) + { + return 0; + } + virtual size_t DollopEntryClosingSize(DollopEntry_t*, Zipr_t *) { return 0; } @@ -66,24 +71,34 @@ class ZiprPluginInterface_t * it's Place() function to determine the beginning * of the space allocated for this dollop entry. * - * Because multiple plugins may want to plop the same - * dollop entry, the current address of the instruction - * within the entry is passed as the second parameter. - * If the plugin moves that instruction, it must update - * the parameter. In order to know the length of the - * instruction, there is the third parameter. + * entry: A pointer to the dollop entry to be plopped. + * + * instruction_address: Because multiple plugins + * may want to plop the same dollop entry, the current + * address of the instruction within the entry is + * passed in this parameter. If the plugin moves that + * instruction, it must update the parameter. + * + * instruction_size: The size of the instruction itself. + * + * placed_instruction: A flag that the plugin sets + * to tell Zipr whether this plugin placed the + * instruction or whether it just wrote into the entry + * surrounding the instruction. The plugin should set + * this value appropriately. The default is false. * - * Finally, to access the other functions that Zipr - * provides, the fourth parameter is available. + * zipr: Pointer to a Zipr object for plugin access to + * functionality provided by zipr. * * As output, the implementation must provide the * address of the memory that "concludes" the * dollop entry. */ - virtual RangeAddress_t PlopDollopEntry(Zipr_SDK::DollopEntry_t *, - RangeAddress_t &, - size_t, - Zipr_t *) + virtual RangeAddress_t PlopDollopEntry(Zipr_SDK::DollopEntry_t *entry, + RangeAddress_t &instruction_address, + size_t instruction_size, + bool &placed_instruction, + Zipr_t *zipr) { return 0; }