##// END OF EJS Templates
Added bool loadfile(abstractBinFile* file)...
Added bool loadfile(abstractBinFile* file) and bool dumpMemory(unsigned int address, unsigned int count, QString file, const QString &format); to the genericPySysDriver, now all plugins can load an abstract binary file(bin/srec/elf) and they can dump any memory space to either an srec or a binary file. This function are able to deal with file and host endianness. Functions: -bool dumpMemory(unsigned int address,unsigned int count,QString file); -bool memSet(unsigned int address,int value, unsigned int count); -bool loadbin(unsigned int address,QString file); are moved to socexplorerplugin which makes them available from C++.

File last commit:

r71:c4b98d42ee59 default
r71:c4b98d42ee59 default
Show More
PySocExplorer_init.cpp
34 lines | 4.5 KiB | text/x-c | CppLexer
#include <PythonQt.h>
#include <PythonQtConversion.h>
#include "PySocExplorer0.h"
void PythonQt_init_PySocExplorer(PyObject* module) {
PythonQt::priv()->registerClass(&ElfFile::staticMetaObject, "PySocExplorer", PythonQtCreateObject<PythonQtWrapper_ElfFile>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_ElfFile>, module, 0);
PythonQt::self()->addParentClass("ElfFile", "abstractBinFile",PythonQtUpcastingOffset<ElfFile,abstractBinFile>());
PythonQt::priv()->registerClass(&MemSizeWdgt::staticMetaObject, "PySocExplorer", PythonQtCreateObject<PythonQtWrapper_MemSizeWdgt>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_MemSizeWdgt>, module, 0);
PythonQt::priv()->registerClass(&QHexEdit::staticMetaObject, "PySocExplorer", PythonQtCreateObject<PythonQtWrapper_QHexEdit>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_QHexEdit>, module, 0);
PythonQt::priv()->registerClass(&QHexSpinBox::staticMetaObject, "PySocExplorer", PythonQtCreateObject<PythonQtWrapper_QHexSpinBox>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_QHexSpinBox>, module, 0);
PythonQt::priv()->registerClass(&SocExplorerPlot::staticMetaObject, "PySocExplorer", PythonQtCreateObject<PythonQtWrapper_SocExplorerPlot>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_SocExplorerPlot>, module, 0);
PythonQt::priv()->registerClass(&TCP_Terminal_Client::staticMetaObject, "PySocExplorer", PythonQtCreateObject<PythonQtWrapper_TCP_Terminal_Client>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_TCP_Terminal_Client>, module, 0);
PythonQt::priv()->registerCPPClass("XByteArray", "", "PySocExplorer", PythonQtCreateObject<PythonQtWrapper_XByteArray>, NULL, module, 0);
PythonQt::priv()->registerClass(&abstractBinFile::staticMetaObject, "PySocExplorer", PythonQtCreateObject<PythonQtWrapper_abstractBinFile>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_abstractBinFile>, module, 0);
PythonQt::priv()->registerClass(&abstractBinFileWidget::staticMetaObject, "PySocExplorer", PythonQtCreateObject<PythonQtWrapper_abstractBinFileWidget>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_abstractBinFileWidget>, module, 0);
PythonQt::priv()->registerClass(&binaryFile::staticMetaObject, "PySocExplorer", PythonQtCreateObject<PythonQtWrapper_binaryFile>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_binaryFile>, module, 0);
PythonQt::self()->addParentClass("binaryFile", "abstractBinFile",PythonQtUpcastingOffset<binaryFile,abstractBinFile>());
PythonQt::priv()->registerClass(&binaryFileWidget::staticMetaObject, "PySocExplorer", PythonQtCreateObject<PythonQtWrapper_binaryFileWidget>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_binaryFileWidget>, module, 0);
PythonQt::self()->addParentClass("binaryFileWidget", "abstractBinFileWidget",PythonQtUpcastingOffset<binaryFileWidget,abstractBinFileWidget>());
PythonQt::priv()->registerCPPClass("codeFragment", "", "PySocExplorer", PythonQtCreateObject<PythonQtWrapper_codeFragment>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_codeFragment>, module, 0);
PythonQt::priv()->registerClass(&elfFileWidget::staticMetaObject, "PySocExplorer", PythonQtCreateObject<PythonQtWrapper_elfFileWidget>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_elfFileWidget>, module, 0);
PythonQt::self()->addParentClass("elfFileWidget", "abstractBinFileWidget",PythonQtUpcastingOffset<elfFileWidget,abstractBinFileWidget>());
PythonQt::priv()->registerClass(&elfInfoWdgt::staticMetaObject, "PySocExplorer", PythonQtCreateObject<PythonQtWrapper_elfInfoWdgt>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_elfInfoWdgt>, module, 0);
PythonQt::priv()->registerCPPClass("elfparser", "", "PySocExplorer", PythonQtCreateObject<PythonQtWrapper_elfparser>, NULL, module, 0);
PythonQt::priv()->registerClass(&genericBinaryFileWidget::staticMetaObject, "PySocExplorer", PythonQtCreateObject<PythonQtWrapper_genericBinaryFileWidget>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_genericBinaryFileWidget>, module, 0);
PythonQt::priv()->registerClass(&srecFile::staticMetaObject, "PySocExplorer", PythonQtCreateObject<PythonQtWrapper_srecFile>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_srecFile>, module, 0);
PythonQt::self()->addParentClass("srecFile", "abstractBinFile",PythonQtUpcastingOffset<srecFile,abstractBinFile>());
PythonQt::priv()->registerClass(&srecFileWidget::staticMetaObject, "PySocExplorer", PythonQtCreateObject<PythonQtWrapper_srecFileWidget>, PythonQtSetInstanceWrapperOnShell<PythonQtShell_srecFileWidget>, module, 0);
PythonQt::self()->addParentClass("srecFileWidget", "abstractBinFileWidget",PythonQtUpcastingOffset<srecFileWidget,abstractBinFileWidget>());
}