Skip to content

Commit

Permalink
add OnBasicBlcokTranslated callback
Browse files Browse the repository at this point in the history
  • Loading branch information
ifratric committed Dec 22, 2023
1 parent 5a45ad4 commit 9cdc11e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tinyinst.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,8 @@ void TinyInst::TranslateBasicBlock(char *address,
unwind_generator->OnBasicBlockEnd(module,
(size_t)address + offset,
GetCurrentInstrumentedAddress(module));

OnBasicBlcokTranslated(module, original_offset, original_offset + last_offset);
}

// starting from address, starts instrumenting code in the module
Expand Down
1 change: 1 addition & 0 deletions tinyinst.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ class TinyInst : public Debugger {

virtual void OnModuleInstrumented(ModuleInfo* module);
virtual void OnModuleUninstrumented(ModuleInfo* module);
virtual void OnBasicBlcokTranslated(ModuleInfo *module, size_t start_offset, size_t end_offset) { }

int32_t sp_offset;
Assembler* assembler_;
Expand Down

0 comments on commit 9cdc11e

Please sign in to comment.