35 lines
779 B
C++
35 lines
779 B
C++
/**
|
|
* @file RDIdebug.cpp
|
|
* @date 17/09/2022
|
|
* @author JackCarterSmith
|
|
* @copyright GPL-v3.0
|
|
* @brief Debug app to test functions of RDI library.
|
|
*
|
|
*/
|
|
|
|
#include <iostream>
|
|
#include <RDI.h>
|
|
|
|
|
|
int main( int argc, char *argv[] ) {
|
|
unsigned int i;
|
|
|
|
printf("Using RDI lib v%s\n\n", RDI::getLibVersion().c_str());
|
|
//cout << "Using RDI lib v" << RDI::getLibVersion() << endl << endl;
|
|
|
|
if ( argc > 1 )
|
|
RDI::CreateRDatHandler(argv[1]);
|
|
else
|
|
RDI::CreateRDatHandler(".");
|
|
|
|
printf("> Section found: %d\n", RDI::getSectionCount());
|
|
for ( i = 0; i < RDI::getSectionCount(); i++ ) {
|
|
printf(" -Section %d name: %s\n", i, RDI::getSectionName(i).c_str());
|
|
printf(" -Section %d offset: 0x%X\n", i, RDI::getSectionOffset(i));
|
|
}
|
|
|
|
RDI::DestroyRDatHandler();
|
|
|
|
return 0;
|
|
}
|