diff --git a/.hgsubstate b/.hgsubstate --- a/.hgsubstate +++ b/.hgsubstate @@ -1,4 +1,4 @@ 1cb664ab4bb3c531d706b1948a378ed9810c0dda src/SocExplorerEngine/PeripheralWidget 1f143e4ae72a0bb4832b546eb76eb50e94049b80 src/common/genericBinaryFiles -2dce25b198558be573f56c1cf337aa95ddd666d6 src/common/lppserial +2b353bf8243cbfb3db44e196f33bd164c11c9949 src/common/lppserial 923afde9cc96bb419cf898560d080ec96991aeca src/common/qhexedit diff --git a/ressources/Grlib.xml b/ressources/Grlib.xml --- a/ressources/Grlib.xml +++ b/ressources/Grlib.xml @@ -430,6 +430,23 @@ generic is set to 2. Reset value: ‘0’."/> + + + + + + + + + + + + + + + + + diff --git a/src/PyWdgt/pythonconsole.cpp b/src/PyWdgt/pythonconsole.cpp --- a/src/PyWdgt/pythonconsole.cpp +++ b/src/PyWdgt/pythonconsole.cpp @@ -15,7 +15,6 @@ void PythonQt_init_PySocExplorerEngine(P PythonConsole::PythonConsole(socexplorerproxy *proxy, QWidget *parent) : QWidget(parent) { - //PythonQt::init(); PythonQt::init(PythonQt::RedirectStdOut); PythonQt_QtAll::init(); this->proxy = proxy; @@ -25,7 +24,6 @@ PythonConsole::PythonConsole(socexplorer this->console = new PythonQtScriptingConsoleDandD(NULL, PythonQt::self()->getMainModule()); this->mainlayout->addWidget(this->console); this->setWindowTitle(tr("Python Scripting Console")); - this->bussdriver = 0; this->setAcceptDrops(true); this->setLayout(this->mainlayout); connect(this->console,SIGNAL(pyConsoleRunFiles(QStringList)),this,SLOT(pyConsoleRunFiles(QStringList))); @@ -45,13 +43,6 @@ void PythonConsole::removeVariable(const this->mainContext->removeVariable(name); } - -void PythonConsole::setBussDriver(socexplorerplugin *driver) -{ - this->bussdriver = driver; - this->mainContext->addObject("buss", this->bussdriver); -} - void PythonConsole::registerObject(QObject* object,const QString& instanceName) { this->mainContext->addObject(instanceName,object); @@ -72,13 +63,6 @@ void PythonConsole::removeDriver(const Q this->mainContext->removeVariable(instanceName); } -void PythonConsole::removeBussDriver() -{ - this->bussdriver = 0; - this->mainContext->removeVariable("buss"); - emit this->rootDriverDelete(); -} - void PythonConsole::pyConsoleRunFiles(const QStringList & pathList) { diff --git a/src/PyWdgt/pythonconsole.h b/src/PyWdgt/pythonconsole.h --- a/src/PyWdgt/pythonconsole.h +++ b/src/PyWdgt/pythonconsole.h @@ -49,8 +49,6 @@ public: signals: void rootDriverDelete(); public slots: - void setBussDriver(socexplorerplugin* driver); - void removeBussDriver(); void removeDriver(const QString& instanceName); void pyConsoleRunFiles(const QStringList&); void pyConsoleRunFile(const QString& fileName); @@ -63,11 +61,9 @@ protected: private: QHBoxLayout* mainlayout; - socexplorerplugin* bussdriver; PythonQtScriptingConsoleDandD* console; PythonQtObjectPtr* mainContext; socexplorerproxy* proxy; - //LPMONMainWindow* mainwin; }; #endif // PYTHONCONSOLE_H diff --git a/src/SocExplorerEngine/SocExplorerEngine.pro b/src/SocExplorerEngine/SocExplorerEngine.pro --- a/src/SocExplorerEngine/SocExplorerEngine.pro +++ b/src/SocExplorerEngine/SocExplorerEngine.pro @@ -67,7 +67,11 @@ header.files = engine/socexplorerengine. PeripheralWidget/src/registerwidget.h \ PeripheralWidget/src/socregsviewer.h \ PeripheralWidget/src/socregsviewernew.h \ - memtester/memtester.h + memtester/memtester.h \ + engine/socexplorersettings.h \ + engine/socexplorersettingsdialog.h \ + engine/socexplorergui.h\ + engine/socexplorerconfigkeys.h @@ -125,7 +129,11 @@ HEADERS += \ PySocExplorerEngine.h \ memtester/memtester.h\ PeripheralWidget/src/socregsviewernew.h \ - PeripheralWidget/src/collapsableperipheralwidget.h + PeripheralWidget/src/collapsableperipheralwidget.h \ + engine/socexplorersettings.h \ + engine/socexplorersettingsdialog.h \ + engine/socexplorergui.h \ + engine/socexplorerconfigkeys.h @@ -155,7 +163,10 @@ SOURCES += \ plugins/socexplorerplugin.cpp \ memtester/memtester.cpp \ PeripheralWidget/src/socregsviewernew.cpp \ - PeripheralWidget/src/collapsableperipheralwidget.cpp + PeripheralWidget/src/collapsableperipheralwidget.cpp \ + engine/socexplorersettings.cpp \ + engine/socexplorersettingsdialog.cpp \ + engine/socexplorergui.cpp OTHER_FILES += \ @@ -167,7 +178,8 @@ OTHER_FILES += \ FORMS += \ PeripheralWidget/src/socregsviewernew.ui \ - PeripheralWidget/src/collapsableperipheralwidget.ui + PeripheralWidget/src/collapsableperipheralwidget.ui \ + engine/socexplorersettingsdialog.ui RESOURCES += \ diff --git a/src/SocExplorerEngine/engine/socexplorerengine.cpp b/src/SocExplorerEngine/engine/socexplorerengine.cpp --- a/src/SocExplorerEngine/engine/socexplorerengine.cpp +++ b/src/SocExplorerEngine/engine/socexplorerengine.cpp @@ -21,13 +21,18 @@ ----------------------------------------------------------------------------*/ #include "socexplorerengine.h" #include +#include +#include +#include SocExplorerEngine* SocExplorerEngine::_self = NULL; socExplorerXmlModel* SocExplorerEngine::p_xmlmodel=NULL; QMainWindow* SocExplorerEngine::mainWindow=NULL; QList* SocExplorerEngine::SOCs=NULL; +QSettings* SocExplorerEngine::m_settings=NULL; int SocExplorerEngine::loglvl=1; + SocExplorerEngine::SocExplorerEngine(QObject *parent) : QObject(parent) { @@ -35,7 +40,9 @@ SocExplorerEngine::SocExplorerEngine(QOb { SOCs = new QList; } - + m_settings = new QSettings(); + SocExplorerCoreSettingsGUI* cfggui=new SocExplorerCoreSettingsGUI(); + SocExplorerSettings::registerConfigEntry(cfggui,QIcon(":/images/config.svg"),"SocExplorer Core"); } @@ -88,6 +95,14 @@ QStringList SocExplorerEngine::pluginFol } } } + QStringList localCfg = SocExplorerSettings::value(SOCEXPLORERENGINE_SETTINGS_SCOPE,SOCEXPLORERENGINE_SETTINGS_PLUGINS_LOOKUP_PATH).toString().split(";"); + QString dir; + foreach (dir, localCfg) + { + QDir plugDir(dir); + if(plugDir.exists()) + folders.append(dir); + } return folders; } @@ -274,13 +289,29 @@ void SocExplorerEngine::removeSOC(socexp delete soc; } + void SocExplorerEngine::message(socexplorerplugin *sender, const QString &message, int debugLevel) { + if(!_self) + init(); + SocExplorerEngine::message(sender->instanceName(),message,debugLevel); +} + +void SocExplorerEngine::message(QObject *sender, const QString &message, int debugLevel) +{ + if(!_self) + init(); + SocExplorerEngine::message(sender->objectName(),message,debugLevel); +} + +void SocExplorerEngine::message(const QString &sender, const QString &message, int debugLevel) +{ // TODO add multi output message manager IE also log in files + static QTextStream SocExplorerEngineStdout(stdout); if(!_self) init(); if(loglvl>=debugLevel) - qDebug()<< QTime::currentTime().toString()+" " + sender->instanceName()+":"+message; + SocExplorerEngineStdout << QTime::currentTime().toString()+" " + sender+":"+message << endl; } void SocExplorerEngine::setLogLevel(int level) diff --git a/src/SocExplorerEngine/engine/socexplorerengine.h b/src/SocExplorerEngine/engine/socexplorerengine.h --- a/src/SocExplorerEngine/engine/socexplorerengine.h +++ b/src/SocExplorerEngine/engine/socexplorerengine.h @@ -42,6 +42,7 @@ #include #include #include +#include #if defined(SOCEXPLORER_SDK_BUILD) # define SOCEXPLORER_SDK_EXPORT Q_DECL_EXPORT @@ -83,6 +84,7 @@ class SOCEXPLORER_SDK_EXPORT SocExplorer Q_OBJECT private: static SocExplorerEngine* _self; + static QSettings* m_settings; SocExplorerEngine(QObject *parent = 0); static void init(); @@ -107,6 +109,8 @@ public: static void addSOC(socexplorerplugin* rootPlugin); static void removeSOC(socexplorerplugin* rootPlugin); static void message(socexplorerplugin* sender,const QString& message,int debugLevel=0); + static void message(QObject* sender,const QString& message,int debugLevel=0); + static void message(const QString& sender,const QString& message,int debugLevel=0); static void setLogLevel(int level); static bool isSocLitleEndian(socexplorerplugin* plugin); signals: diff --git a/src/SocExplorerEngine/pluginManagerWdgt/pluginmanagerWDGT.cpp b/src/SocExplorerEngine/pluginManagerWdgt/pluginmanagerWDGT.cpp --- a/src/SocExplorerEngine/pluginManagerWdgt/pluginmanagerWDGT.cpp +++ b/src/SocExplorerEngine/pluginManagerWdgt/pluginmanagerWDGT.cpp @@ -97,47 +97,3 @@ void pluginmanagerWDGT::setChildLoadable -void pluginmanagerWDGT::addPlugin() -{ -// /!\ TODO update it remove maximum operation from widget -// QString fileName = QFileDialog::getOpenFileName(this,tr("Open Plugin"), QDir::homePath(), tr("Plugin Files Files (*.dll *.so *.so.*)")); -// if(pluginloader::checklibrary(fileName)) -// { -// QFile::copy(fileName,QString(SocExplorerEngine::pluginFolder())+"/"+ fileName.section('/',-1)); -// } -// this->pluginTable->refreshPluginList(); -} - - -void pluginmanagerWDGT::removePlugin() -{ -// for(int i=0;ipluginTable->selectedItems().count();i++) -// { -// QListWidgetItem* item = this->pluginTable->selectedItems().at(i); -// if(item!=NULL) -// { -// QFile::remove(QString(SocExplorerEngine::pluginFolder())+"/"+item->text()); -// } -// } -// this->pluginTable->refreshPluginList(); -} - - - -void pluginmanagerWDGT::loadplugin() -{ -// for(int i=0;ipluginTable->selectedItems().count();i++) -// { -// QListWidgetItem* item = this->pluginTable->selectedItems().at(i); -// if(item!=NULL) -// { -// QString plugin = QString(SocExplorerEngine::pluginFolder())+"/"+item->text(); -// emit this->loadSysDrviver(plugin); -// } -// } -// this->pluginTable->refreshPluginList(); -} - - - - diff --git a/src/SocExplorerEngine/pluginManagerWdgt/pluginmanagerWDGT.h b/src/SocExplorerEngine/pluginManagerWdgt/pluginmanagerWDGT.h --- a/src/SocExplorerEngine/pluginManagerWdgt/pluginmanagerWDGT.h +++ b/src/SocExplorerEngine/pluginManagerWdgt/pluginmanagerWDGT.h @@ -66,11 +66,7 @@ signals: void pluginselected(const QString& instanceName); public slots: - //void libselected(int row); - void addPlugin(); - void removePlugin(); - void loadplugin(); - //void loadplugin(QListWidgetItem*); + private: diff --git a/src/SocExplorerEngine/pluginloader/pluginloader.cpp b/src/SocExplorerEngine/pluginloader/pluginloader.cpp --- a/src/SocExplorerEngine/pluginloader/pluginloader.cpp +++ b/src/SocExplorerEngine/pluginloader/pluginloader.cpp @@ -13,6 +13,8 @@ #ifdef SOCEXPLORER_CUSTOM_PLUGIN_LOADER #include "unix/unixpluginloader.h" #endif +#include +#include pluginloader* pluginloader::_self = NULL; PluginsCache* pluginloader::_cache = NULL; @@ -27,38 +29,6 @@ pluginloader::pluginloader() scanFolders(); } - -QStringList pluginloader::readFoldersList(const QStringList confFiles) -{ - QDir testDir; - QStringList folders; - QFile confFile; - for(int i=0;iappend(fileInfo.fileName(),fileInfo.path(),_getlibName(fileInfo.filePath()),_getlibPID(fileInfo.filePath()),_getlibPID(fileInfo.filePath())); @@ -90,7 +61,7 @@ int pluginloader::p_checklibraryQlib(con lib->load(); if(!lib->isLoaded()) { - qDebug()<errorString(); + SocExplorerEngine::message("pluginloader::p_checklibraryQlib",lib->errorString(),3); lib->~QLibrary(); lib = new QLibrary(fileName); lib->load(); diff --git a/src/SocExplorerEngine/pluginloader/pluginloader.h b/src/SocExplorerEngine/pluginloader/pluginloader.h --- a/src/SocExplorerEngine/pluginloader/pluginloader.h +++ b/src/SocExplorerEngine/pluginloader/pluginloader.h @@ -81,7 +81,6 @@ private: int p_checklibraryCustom(const QString fileName); socexplorerplugin* p_newsocexplorerpluginQlib(const QString Name); socexplorerplugin* p_newsocexplorerpluginCustom(const QString Name); - static QStringList readFoldersList(const QStringList confFiles); static QString* _cacheLookup(const QString Name); static QString _getlibName(const QString fileName); static int _getlibPID(const QString fileName); diff --git a/src/SocExplorerEngine/pluginloader/pluginscache.cpp b/src/SocExplorerEngine/pluginloader/pluginscache.cpp --- a/src/SocExplorerEngine/pluginloader/pluginscache.cpp +++ b/src/SocExplorerEngine/pluginloader/pluginscache.cpp @@ -1,5 +1,6 @@ #include "pluginscache.h" #include +#include PluginsCacheItem::PluginsCacheItem(const QString &fileName, const QString &path, const QString &pluginName, int VID, int PID) { @@ -56,12 +57,12 @@ void PluginsCache::append(const QString { if(this->items->at(i)->compare(item)) { - qDebug()<< fileName << "already in the cache"; + SocExplorerEngine::message("PluginsCache",fileName + " already in the cache",3); delete item; return; } } - qDebug()<< fileName << "added to cache"; + SocExplorerEngine::message("PluginsCache",fileName + " added to cache",3); this->items->append(item); } diff --git a/src/SocExplorerEngine/pluginloader/unix/unixpluginloader.cpp b/src/SocExplorerEngine/pluginloader/unix/unixpluginloader.cpp --- a/src/SocExplorerEngine/pluginloader/unix/unixpluginloader.cpp +++ b/src/SocExplorerEngine/pluginloader/unix/unixpluginloader.cpp @@ -1,15 +1,16 @@ #include "unixpluginloader.h" #include #include +#include unixPluginLoader::unixPluginLoader(const QString &libPath) { - qDebug()<<"try to open "+libPath; + SocExplorerEngine::message("unixPluginLoader::unixPluginLoader","try to open "+libPath,3); dlHandle = dlopen(libPath.toStdString().c_str(),RTLD_LAZY|RTLD_GLOBAL); if(dlHandle==NULL) - qDebug() << "Failed"<< dlerror(); + SocExplorerEngine::message("unixPluginLoader::unixPluginLoader",QString("Failed ") + dlerror(),3); else - qDebug() << "Success"; + SocExplorerEngine::message("unixPluginLoader::unixPluginLoader","Success " ,3); this->libPath = libPath; } @@ -17,12 +18,12 @@ void *unixPluginLoader::resolve(const QS { if(dlHandle!=NULL) { - qDebug()<<"try to resolve "+symbol+" in "+libPath; + SocExplorerEngine::message("unixPluginLoader::resolve","try to resolve "+symbol+" in "+libPath ,3); void* sym = dlsym (dlHandle, symbol.toStdString().c_str()); if(sym==NULL) - qDebug() << "Failed"<< dlerror(); + SocExplorerEngine::message("unixPluginLoader::resolve",QString("Failed")+ dlerror() ,3); else - qDebug() << "Success"; + SocExplorerEngine::message("unixPluginLoader::resolve","Success",3); return sym; } return NULL; @@ -33,6 +34,6 @@ void unixPluginLoader::close() if(dlHandle!=NULL) { dlclose(dlHandle); - qDebug() << dlerror(); + SocExplorerEngine::message("unixPluginLoader::close",dlerror(),3); } } diff --git a/src/SocExplorerEngine/plugins/socexplorerplugin.cpp b/src/SocExplorerEngine/plugins/socexplorerplugin.cpp --- a/src/SocExplorerEngine/plugins/socexplorerplugin.cpp +++ b/src/SocExplorerEngine/plugins/socexplorerplugin.cpp @@ -108,6 +108,7 @@ void socexplorerplugin::setInstanceName( if(this->menu) this->menu->setTitle(this->_instanceName); this->setWindowTitle(newName); + this->setObjectName(newName); } bool socexplorerplugin::dumpMemory(unsigned int address, unsigned int count, QString file) @@ -261,4 +262,3 @@ bool socexplorerplugin::dumpMemory(unsig return false; } - diff --git a/src/SocExplorerEngine/plugins/socexplorerplugin.h b/src/SocExplorerEngine/plugins/socexplorerplugin.h --- a/src/SocExplorerEngine/plugins/socexplorerplugin.h +++ b/src/SocExplorerEngine/plugins/socexplorerplugin.h @@ -85,6 +85,7 @@ public: //! Default plugin constructor, any plugin should call this constructor. socexplorerplugin(QWidget *parent = 0,bool createPyObject=true):QDockWidget(parent) { + Q_UNUSED(createPyObject) closeAction=NULL; menu=NULL; ChildsMenu=NULL; @@ -156,10 +157,10 @@ public slots: virtual void setInstanceName(const QString& newName); virtual bool dumpMemory(unsigned int address,unsigned int count,QString file); + virtual bool dumpMemory(unsigned int address,unsigned int count,QString file,const QString& format); virtual bool memSet(unsigned int address,int value, unsigned int count); virtual bool loadbin(unsigned int address,QString file); virtual bool loadfile(abstractBinFile* file); - virtual bool dumpMemory(unsigned int address,unsigned int count,QString file,const QString& format); QVariantList Read(unsigned int address, unsigned int count); void Write(unsigned int address, QList dataList); socexplorerplugin* parentPlugin(){return this->parent;} diff --git a/src/SocExplorerEngine/proxy/socexplorerproxy.cpp b/src/SocExplorerEngine/proxy/socexplorerproxy.cpp --- a/src/SocExplorerEngine/proxy/socexplorerproxy.cpp +++ b/src/SocExplorerEngine/proxy/socexplorerproxy.cpp @@ -32,6 +32,7 @@ QList* socexplorerpr socexplorerplugin* socexplorerproxy::root=NULL; socexplorerplugin* socexplorerproxy::parent=NULL; PluginsCache* socexplorerproxy::cache=NULL; +QStringList* socexplorerproxy::linearDriverPathList=NULL; socexplorerproxy::socexplorerproxy(QObject *parent) : QObject(parent) @@ -39,6 +40,7 @@ socexplorerproxy::socexplorerproxy(QObje cache = new PluginsCache; drivers = new QList; linearDriverList=new QList; + linearDriverPathList=new QStringList; root = NULL; } @@ -50,6 +52,7 @@ socexplorerproxy::socexplorerproxy(QMain cache = new PluginsCache; drivers = new QList; linearDriverList=new QList; + linearDriverPathList=new QStringList; root = NULL; } @@ -77,7 +80,7 @@ void socexplorerproxy::loadSysDriver(con { socexplorerplugin* driver = pluginloader::newsocexplorerplugin(name); QString driverName = _self->getinstanceName(driver->baseName()); - loadSysDriver(driver,driverName); + loadSysDriver(driver,driverName,name); } } @@ -87,18 +90,22 @@ void socexplorerproxy::loadSysDriver(con if(pluginloader::libcanberoot(name) && !_self->instanceExists(instanceName)) { socexplorerplugin* driver = pluginloader::newsocexplorerplugin(name); - loadSysDriver(driver,instanceName); + loadSysDriver(driver,instanceName,name); } } -void socexplorerproxy::loadSysDriver(socexplorerplugin *driver, const QString instanceName) +void socexplorerproxy::loadSysDriver(socexplorerplugin *driver, const QString instanceName, const QString path) { if(!_self)init(); driver->setInstanceName(instanceName); driver->parent = NULL; drivers->append(driver); linearDriverList->append(driver); + if(path.isEmpty()) + linearDriverPathList->append(driver->baseName()); + else + linearDriverPathList->append(path); connectChildToProxy(driver); emit _self->addPluginGUI(driver); emit _self->clearMenu(); @@ -117,7 +124,7 @@ void socexplorerproxy::loadChildSysDrive bool ok=true; if(ok) { - if(parent!=NULL)_self->loadSysDriverToParent(driver,parent,driverName); + if(parent!=NULL)_self->loadSysDriverToParent(driver,parent,driverName,child); } } } @@ -133,7 +140,7 @@ void socexplorerproxy::loadSysDriverToPa if(ok) { socexplorerplugin* parent=_self->getSysDriver(ParentInst); - if(parent!=NULL)loadSysDriverToParent(driver,parent,driverName); + if(parent!=NULL)loadSysDriverToParent(driver,parent,driverName,name); } } } @@ -149,15 +156,19 @@ void socexplorerproxy::loadSysDriverToPa if(ok) { socexplorerplugin* parent=_self->getSysDriver(ParentInst); - if(parent!=NULL)loadSysDriverToParent(driver,parent,instanceName); + if(parent!=NULL)loadSysDriverToParent(driver,parent,instanceName,name); } } } -void socexplorerproxy::loadSysDriverToParent(socexplorerplugin *driver,socexplorerplugin *parent, const QString instanceName) +void socexplorerproxy::loadSysDriverToParent(socexplorerplugin *driver,socexplorerplugin *parent, const QString instanceName,const QString path) { if(!_self)init(); linearDriverList->append(driver); + if(path.isEmpty()) + linearDriverPathList->append(driver->baseName()); + else + linearDriverPathList->append(path); driver->parent = parent; driver->setInstanceName(instanceName); parent->childs.append(driver); @@ -264,6 +275,57 @@ socexplorerplugin *socexplorerproxy::fin return NULL; } +QStringList socexplorerproxy::getPluginsList() +{ + if(!_self)init(); + QStringList result; + socexplorerplugin* plugin; + for(int i=0; icount();i++) + { + QString parent=""; + plugin=linearDriverList->at(i); + if(plugin->parent)parent=plugin->parent->instanceName(); + result.append(linearDriverList->at(i)->instanceName()+":"+parent+":"+linearDriverPathList->at(i)); + } + return result; +} + +bool socexplorerproxy::loadPluginsList(QStringList plugins) +{ + if(!_self)init(); + QString plugin; + int lastLoadedPlugins=-1; + QStringList loadedPlugins; + while(plugins.count() && lastLoadedPlugins!=loadedPlugins.count()) + { + lastLoadedPlugins=loadedPlugins.count(); + for (int i = 0; i < plugins.count(); i++) + { + plugin=plugins[i]; + QStringList args=plugin.split(':',QString::KeepEmptyParts); + if(args.count()==3) + { + if(args[1].isEmpty()) + { + _self->loadSysDriver(args[2],args[0]); + loadedPlugins.append(args[0]); + plugins.removeAt(i); + } + else if(loadedPlugins.contains(args[1])) + { + _self->loadSysDriverToParent(args[2],args[0],args[1]); + loadedPlugins.append(args[0]); + plugins.removeAt(i); + } + } + else + { + plugins.removeAt(i); + } + } + } +} + bool socexplorerproxy::instanceExists(const QString &instanceName) { return !socexplorerproxy::instanceNameIsValid(instanceName); @@ -312,6 +374,7 @@ void socexplorerproxy::closeSysDriver(so emit _self->removePluginGUI(driver); if(driver->parent==NULL)SocExplorerEngine::removeSOC(driver); while(driver->childs.count()!=0)closeSysDriver(driver->childs.first()); + linearDriverPathList->removeAt(linearDriverList->indexOf(driver)); linearDriverList->removeOne(driver); if(driver->parent!= NULL) { diff --git a/src/SocExplorerEngine/proxy/socexplorerproxy.h b/src/SocExplorerEngine/proxy/socexplorerproxy.h --- a/src/SocExplorerEngine/proxy/socexplorerproxy.h +++ b/src/SocExplorerEngine/proxy/socexplorerproxy.h @@ -54,6 +54,8 @@ public: static void disconnectChildToProxy(socexplorerplugin* child); static bool instanceNameIsValid(const QString& instanceName); static socexplorerplugin* findPlugin(const QString &instanceName); + static QStringList getPluginsList(); + static bool loadPluginsList( QStringList plugins); QT_ENSURE_STACK_ALIGNED_FOR_SSE static void loadChildSysDriver(socexplorerplugin* parent,const QString child); @@ -72,10 +74,10 @@ signals: public slots: QT_ENSURE_STACK_ALIGNED_FOR_SSE void loadSysDriver(const QString name); QT_ENSURE_STACK_ALIGNED_FOR_SSE void loadSysDriver(const QString name,const QString instanceName); - QT_ENSURE_STACK_ALIGNED_FOR_SSE void loadSysDriver(socexplorerplugin* driver,const QString instanceName); + QT_ENSURE_STACK_ALIGNED_FOR_SSE void loadSysDriver(socexplorerplugin* driver,const QString instanceName,const QString path=""); QT_ENSURE_STACK_ALIGNED_FOR_SSE void loadSysDriverToParent(const QString name,const QString ParentInst); QT_ENSURE_STACK_ALIGNED_FOR_SSE void loadSysDriverToParent(const QString name,const QString instanceName,const QString ParentInst); - QT_ENSURE_STACK_ALIGNED_FOR_SSE void loadSysDriverToParent(socexplorerplugin *driver,socexplorerplugin *parent, const QString instanceName); + QT_ENSURE_STACK_ALIGNED_FOR_SSE void loadSysDriverToParent(socexplorerplugin *driver,socexplorerplugin *parent, const QString instanceName,const QString path=""); QT_ENSURE_STACK_ALIGNED_FOR_SSE void changeSysDriverInstName(const QString instanceName); QT_ENSURE_STACK_ALIGNED_FOR_SSE void changeSysDriverInstName(const QString newinstanceName,const QString previnstanceName); // QT_ENSURE_STACK_ALIGNED_FOR_SSE void loadChild(socexplorerplugin* parent); @@ -95,6 +97,7 @@ private: static QMainWindow* mainWindow; static QList* drivers; static QList* linearDriverList; + static QStringList* linearDriverPathList; static socexplorerplugin* root; static socexplorerplugin* parent; static PluginsCache* cache; diff --git a/src/common/pythonQtOut/generated_cpp/PySocExplorer/PySocExplorer0.cpp b/src/common/pythonQtOut/generated_cpp/PySocExplorer/PySocExplorer0.cpp --- a/src/common/pythonQtOut/generated_cpp/PySocExplorer/PySocExplorer0.cpp +++ b/src/common/pythonQtOut/generated_cpp/PySocExplorer/PySocExplorer0.cpp @@ -368,6 +368,11 @@ int PythonQtWrapper_ElfFile::getSymbolC return ( theWrappedObject->getSymbolCount()); } +int PythonQtWrapper_ElfFile::getSymbolIndex(ElfFile* theWrappedObject, const QString& name) +{ + return ( theWrappedObject->getSymbolIndex(name)); +} + QString PythonQtWrapper_ElfFile::getSymbolLinkType(ElfFile* theWrappedObject, int index) { return ( theWrappedObject->getSymbolLinkType(index)); diff --git a/src/common/pythonQtOut/generated_cpp/PySocExplorer/PySocExplorer0.h b/src/common/pythonQtOut/generated_cpp/PySocExplorer/PySocExplorer0.h --- a/src/common/pythonQtOut/generated_cpp/PySocExplorer/PySocExplorer0.h +++ b/src/common/pythonQtOut/generated_cpp/PySocExplorer/PySocExplorer0.h @@ -121,6 +121,7 @@ void delete_ElfFile(ElfFile* obj) { dele qint64 getSegmentVaddr(ElfFile* theWrappedObject, int index); quint64 getSymbolAddress(ElfFile* theWrappedObject, int index); int getSymbolCount(ElfFile* theWrappedObject); + int getSymbolIndex(ElfFile* theWrappedObject, const QString& name); QString getSymbolLinkType(ElfFile* theWrappedObject, int index); QString getSymbolName(ElfFile* theWrappedObject, int index); int getSymbolSectionIndex(ElfFile* theWrappedObject, int index); diff --git a/src/main.cpp b/src/main.cpp --- a/src/main.cpp +++ b/src/main.cpp @@ -29,61 +29,98 @@ #include #include #include +#include +#include -void usage(); + +QCommandLineOption executeOption = QCommandLineOption ( + QStringList() << "e" << "execute", + QCoreApplication::translate("main", "Execute given script