ROSE 0.11.145.147
|
Basic block callback to add "main" address as a function.
If the last instruction of a basic block is a call to __libc_start_main in a shared library, then one of its arguments is the address of the C "main" function.
Definition at line 41 of file ModulesLinux.h.
#include <Rose/BinaryAnalysis/Partitioner2/ModulesLinux.h>
Public Types | |
typedef Sawyer::SharedPointer< LibcStartMain > | Ptr |
Shared ownership pointer to LibcStartMain callback. | |
Public Types inherited from Rose::BinaryAnalysis::Partitioner2::BasicBlockCallback | |
enum | Termination { CONTINUE_DISCOVERY , TERMINATE_NOW , TERMINATE_PRIOR } |
Whether to terminate a basic block. More... | |
using | Ptr = BasicBlockCallbackPtr |
Shared-ownership pointer to a BasicBlockCallback. | |
Public Member Functions | |
virtual bool | operator() (bool chain, const Args &) override |
Callback method. | |
void | nameMainFunction (const PartitionerConstPtr &) const |
Give the name "main" to the main function if it has no name yet. | |
Public Member Functions inherited from Sawyer::SharedObject | |
SharedObject () | |
Default constructor. | |
SharedObject (const SharedObject &) | |
Copy constructor. | |
virtual | ~SharedObject () |
Virtual destructor. | |
SharedObject & | operator= (const SharedObject &) |
Assignment. | |
Static Public Member Functions | |
static Ptr | instance () |
Allocating constructor. | |
typedef Sawyer::SharedPointer<LibcStartMain> Rose::BinaryAnalysis::Partitioner2::ModulesLinux::LibcStartMain::Ptr |
Shared ownership pointer to LibcStartMain callback.
Definition at line 45 of file ModulesLinux.h.
|
inlinestatic |
Allocating constructor.
Definition at line 47 of file ModulesLinux.h.
|
overridevirtual |
Callback method.
This is the method invoked for the callback. The chain
argument is the return value from the previous callback in the list (true for the first callback). The successor callbacks use chain
to indicate whether subsequent callbacks should do anything.
Implements Rose::BinaryAnalysis::Partitioner2::BasicBlockCallback.