X-Git-Url: https://git.siccegge.de//index.cgi?p=frida%2Fdoc.git;a=blobdiff_plain;f=source%2Fapi.rst;fp=source%2Fapi.rst;h=ad044f0e9d0ad6c55e44a76d8fd1ebc48d80d34c;hp=0000000000000000000000000000000000000000;hb=6a92b015ad707daad3cb75d9e4bf89f1de2d578e;hpb=73eb9bb082ca2c0c95e6fcaab6488d88db5e7a67 diff --git a/source/api.rst b/source/api.rst new file mode 100644 index 0000000..ad044f0 --- /dev/null +++ b/source/api.rst @@ -0,0 +1,91 @@ +API +=== + +The APIs for the individual programming languages all derive from the +C++ structure of ``src/core`` adapted to the native spelling of the +respective programming language. As an example, all from within guile +all methods are available as ``classname-functionname`` with +name-components separated by dashes instead of CamelCase. + +Function +-------- + +.. cpp:class:: Function + + Represents a function in the binary. Functions are typically the + target of ``call`` instructions and are composed of + :cpp:class:`BasicBlock` + +.. cpp:function:: std::string Function::getName() const + + Returns the Name of the function + +.. cpp:function:: void Function::setName(const std::string& new_name) + + Updates the Name of the Function. Also takes care to notify all + consumers of the changed name so the new name is displayed + consistently + +.. cpp:function:: bool Function::isDynamic() const + + Returns whether the Function is of the dynamic type. Dynamic + functions are the ones which are imported from shared libraries and + not structly part of the binary at hand. + +.. cpp:function:: uint64_t Function::getStartAddress() const + +.. cpp:function:: InformationManager* Function::getManager() const + +.. cpp:function:: void Function::addBasicBlock(BasicBlock* block) + +.. cpp:function:: const std::map& Function::blocks() + +BasicBlock +---------- +.. cpp:class:: BasicBlock + +.. cpp:function:: uint64_t BasicBlock::getStartAddress() const +.. cpp:function:: uint64_t BasicBlock::getEndAddress() const +.. cpp:function:: void BasicBlock::setStartAddress(uint64_t address) +.. cpp:function:: void BasicBlock::setEndAddress(uint64_t address) +.. cpp:function:: InformationManager* BasicBlock::getManager() const +.. cpp:function:: uint64_t BasicBlock::getNextBlock(size_t index) const +.. cpp:function:: void BasicBlock::setNextBlock(size_t index, uint64_t address) +.. cpp:function:: std::string BasicBlock::getName() const +.. cpp:function:: std::vector BasicBlock::getInstructions() const + +Comment +------- + +.. cpp:class:: Comment + +.. cpp:function:: bool Comment::isLocal() const + + Comments, which are valid for every instance of an address are + considered *global* while comments only valid within the + context of the current function are considered *local* + +.. cpp:function:: void Comment::setText(const std::string& text) + + Updates the text of an comment and takes care of notifying all + consumers of the change. + +.. cpp:function:: std::string Comment::getText() const + + Returns the current text of the comment without any :doc:`macros` expanded. + +.. cpp:function:: uint64_t Comment::getAddress() + + Returns address this comment talks about + +.. cpp:function:: Function* Comment::getLocation() + + Returns the function, the comment talks about, or NULL if the + function is local + + +InformationManager +------------------ + +Disassembler +------------