How to do things AI Noob vs. Pro
List biggest files Free Open Source: Swiss File Knifea command line
Depeche View
command line
free external tools,
cpp sources
articles |
sfk inst [-revoke] [-redo] [-keep-dates] mtkinc mtkmac -dir ... instrument c++ sourcecode with calls to sfk micro tracing kernel. mtkinc: path and name of mtktrace.hpp file mtkmac: mtk block entry macro name, _mtkb_ revoke: undo all changes (copy backups back) keep-dates: on revoke, also reactivate original file dates redo : redo all changes sfk inst mtk/mtktrace.hpp _mtkb_ -dir testfiles !save_ -file .cpp NOTE: is is recommended NOT to use "-dir ." within batch files to ensure that instrumenting is always done on the correct path. read more about the sfk micro tracing kernel in the mtk/ dir. NOTE: sfk inst is an experimental command, coming with no support. do not check-in any source code modified by this command - it is intended only to create experimental, temporary debug versions of applications that fail to be traced otherwise. links to the mtk/ include files: mtk/mtktrace.hpp mtk/mtktrace.cpp example with outputs: sfk inst mtk/mtktrace.hpp _mtkb_ -dir theproj !save_ -file .cpp inst'ed: theproj\FooBank\BarDriver\source\BarBottle.cpp, 2 hits inst'ed: theproj\FooBank\BarDriver\source\BarDriver.cpp, 3 hits inst'ed: theproj\FooBank\BarDriver\source\BarGlass.cpp, 2 hits inst'ed: theproj\FooBank\BarDriver\source\BarMug.cpp, 2 hits inst'ed: theproj\FooBank\DB\source\DBController.cpp, 2 hits inst'ed: theproj\FooBank\GUI\source\FooGUI.cpp, 2 hits Resulting output files (inserted statements highlighted in red): :file: theproj\FooBank\BarDriver\source\BarBottle.cpp #include "mtk/mtktrace.hpp" // [instrumented] #include "Trace.hpp" BarBottle::BarBottle( ) {_mtkb_("BarBottle::BarBottle"); pClSomething = 0; } BarBottle::~BarBottle( ) {_mtkb_("BarBottle::~BarBottle"); if (pClBotte) { delete pClSomething = 0; pClSomething = 0; } } :file: theproj\FooBank\BarDriver\source\BarDriver.cpp #include "mtk/mtktrace.hpp" // [instrumented] #include "BaseLib/Trace/include/Trace.hpp" BarDriver::BarDriver( ) {_mtkb_("BarDriver::BarDriver"); pClBottle = 0; } BarDriver::~BarDriver( ) {_mtkb_("BarDriver::~BarDriver"); if (pClBotte) { delete pClBottle = 0; pClBottle = 0; } } void BarDriver::runDrawThread( ) {_mtkb_("BarDriver::runDrawThread"); for (long i=0; ;) { // dr. stresser: inserted super-important trace output here. // do not remove, i need this. printf("this is super important traceoutput\n"); } } :file: theproj\FooBank\BarDriver\source\BarGlass.cpp #include "mtk/mtktrace.hpp" // [instrumented] BarGlass::BarGlass( ) {_mtkb_("BarGlass::BarGlass"); pClSomething = 0; } BarGlass::~BarGlass( ) {_mtkb_("BarGlass::~BarGlass"); if (pClBotte) { delete pClSomething = 0; pClSomething = 0; } } :file: theproj\FooBank\BarDriver\source\BarMug.cpp #include "mtk/mtktrace.hpp" // [instrumented] #include "FooBank/BarDriver/include/SeldomUsedClass.hpp" BarMug::BarMug( ) {_mtkb_("BarMug::BarMug"); pClSomething = 0; } BarMug::~BarMug( ) {_mtkb_("BarMug::~BarMug"); if (pClBotte) { delete pClSomething = 0; pClSomething = 0; } } :file: theproj\FooBank\DB\source\DBController.cpp #include "mtk/mtktrace.hpp" // [instrumented] #include "FooBank/DB/include/DBController.hpp" #include "FooBank/BarDriver/include/BarDriver.hpp" DBController::DBController() {_mtkb_("DBController::DBController"); pClManager = 0; char *pblast = 0; printf("yeee\n"); // dr. looney: this is superimportant fix. // do not remove. *pblast = '\0'; printf("- ho.\n"); } DBController::~DBController() {_mtkb_("DBController::~DBController"); if (pClManager) { delete pClManager; pClManager = 0; } } :file: theproj\FooBank\GUI\source\FooGUI.cpp #include "mtk/mtktrace.hpp" // [instrumented] #include "FooBank/GUI/include/FooGUI.hpp" #include "FooBank/BarDriver/include/BarBottle.hpp" FooGUI::FooGUI() {_mtkb_("FooGUI::FooGUI"); pClWindow = 0; } FooGUI::~FooGUI() {_mtkb_("FooGUI::~FooGUI"); if (pClWindow) { delete pClWindow; pClWindow = 0; } } sfk inst [-revoke] [-redo] [-keep-dates] mtkinc mtkmac -dir ... instrument c++ sourcecode with calls to sfk micro tracing kernel. mtkinc: path and name of mtktrace.hpp file mtkmac: mtk block entry macro name, _mtkb_ revoke: undo all changes (copy backups back) keep-dates: on revoke, also reactivate original file dates redo : redo all changes sfk inst mtk/ mtktrace.hpp _mtkb_ -dir testfiles !save_ -file .cpp NOTE: is is recommended NOT to use "-dir ." within batch files to ensure that instrumenting is always done on the correct path. read more about the sfk micro tracing kernel in the mtk/ dir. NOTE: sfk inst is an experimental command, coming with no support. do not check-in any source code modified by this command - it is intended only to create experimental, temporary debug versions of applications that fail to be traced otherwise. links to the mtk/ include files: mtk/mtktrace.hpp mtk/ mtktrace.cpp example with outputs: sfk inst mtk/mtktrace.hpp _mtkb_ -dir theproj !save_ -file .cpp inst'ed: theproj\FooBank\BarDriver\ source\BarBottle.cpp, 2 hits inst'ed: theproj\FooBank\BarDriver\ source\BarDriver.cpp, 3 hits inst'ed: theproj\FooBank\BarDriver\ source\BarGlass.cpp, 2 hits inst'ed: theproj\FooBank\BarDriver\ source\BarMug.cpp, 2 hits inst'ed: theproj\FooBank\DB\source\DBController. cpp, 2 hits inst'ed: theproj\ FooBank\GUI\source\FooGUI.cpp, 2 hits Resulting output files (inserted statements highlighted in red): :file: theproj\FooBank\BarDriver\ source\BarBottle.cpp #include "mtk/ mtktrace.hpp" // [instrumented] #include "Trace.hpp" BarBottle::BarBottle( ) {_mtkb_("BarBottle::BarBottle"); pClSomething = 0; } BarBottle::~BarBottle( ) {_mtkb_("BarBottle::~BarBottle"); if (pClBotte) { delete pClSomething = 0; pClSomething = 0; } } :file: theproj\FooBank\ BarDriver\source\BarDriver.cpp #include "mtk/mtktrace.hpp" // [instrumented] #include "BaseLib/ Trace/include/Trace.hpp" BarDriver::BarDriver( ) {_mtkb_("BarDriver::BarDriver"); pClBottle = 0; } BarDriver::~BarDriver( ) {_mtkb_("BarDriver::~BarDriver"); if (pClBotte) { delete pClBottle = 0; pClBottle = 0; } } void BarDriver::runDrawThread( ) {_mtkb_("BarDriver::runDrawThread"); for (long i=0; ;) { // dr. stresser: inserted super-important trace output here. // do not remove, i need this. printf("this is super important traceoutput\n"); } } :file: theproj\FooBank\ BarDriver\source\BarGlass.cpp #include "mtk/mtktrace.hpp" // [instrumented] BarGlass::BarGlass( ) {_mtkb_("BarGlass::BarGlass"); pClSomething = 0; } BarGlass::~BarGlass( ) {_mtkb_("BarGlass::~BarGlass"); if (pClBotte) { delete pClSomething = 0; pClSomething = 0; } } :file: theproj\FooBank\ BarDriver\source\BarMug.cpp #include "mtk/mtktrace.hpp" // [instrumented] #include "FooBank/ BarDriver/include/SeldomUsedClass.hpp" BarMug::BarMug( ) {_mtkb_("BarMug::BarMug"); pClSomething = 0; } BarMug::~BarMug( ) {_mtkb_("BarMug::~BarMug"); if (pClBotte) { delete pClSomething = 0; pClSomething = 0; } } :file: theproj\FooBank\DB\ source\DBController.cpp #include "mtk/mtktrace.hpp" // [instrumented] #include "FooBank/DB/include/ DBController.hpp" #include "FooBank/BarDriver/include/BarDriver. hpp" DB Controller::DBController() {_mtkb_("DBControll er::DBController"); pClManager = 0; char *pblast = 0; printf("yeee\n"); // dr. looney: this is superimportant fix. // do not remove. *pblast = '\0'; printf("- ho.\n"); } DBCon troller::~DBController() {_mtkb_("DBControll er::~DBController"); if (pClManager) { delete pClManager; pClManager = 0; } } :file: theproj\FooBank\GUI\source\FooGUI. cpp #include "mtk/mtktrace.hpp" // [instrumented] #include "FooBank/ GUI/include/FooGUI.hpp" #include "FooBank/BarDriver/include/BarBottle. hpp" FooGUI::FooGUI() {_mtkb_("FooGUI::FooGUI"); pClWindow = 0; } FooGUI::~FooGUI() {_mtkb_("FooGUI::~FooGUI"); if (pClWindow) { delete pClWindow; pClWindow = 0; } } you are viewing this page in mobile portrait mode with a limited layout. turn your device right, use a desktop browser or buy the sfk e-book for improved reading. sfk is a free open-source tool, running instantly without installation efforts. no DLL's, no registry changes - just get sfk.exe from the zip package and use it (binaries for windows, linux and mac are included). |