remove watches from scilab debugger 83/21083/1
Cedric Delamarre [Wed, 4 Sep 2019 15:39:41 +0000 (17:39 +0200)]
Change-Id: I6042f8328e1b98f2f04c175d40b129bac1693b12

scilab/modules/ast/includes/ast/abstractdebugger.hxx
scilab/modules/ast/includes/ast/debugmanager.hxx
scilab/modules/ast/src/cpp/ast/debugmanager.cpp

index ec05aaf..8c9637b 100644 (file)
@@ -52,7 +52,5 @@ public:
 };
 
 typedef std::map<std::string, AbstractDebugger*> Debuggers;
-typedef std::map<std::string, types::InternalType*> Watches;
-
 }
 #endif /* !__ABSTRACT_DEBUGGER_HXX__ */
index 9b1bdb6..869800b 100644 (file)
@@ -62,7 +62,6 @@ private:
         callstack(), pExp(nullptr), interrupted(false), currentBreakPoint(-1), action(Continue), level(0) {}
 
     Breakpoints breakpoints;
-    Watches watches;
     CallStack callstack;
     Debuggers debuggers;
 
@@ -172,12 +171,6 @@ public:
     int getBreakPointCount();
     Breakpoints& getAllBreakPoint();
 
-    //watches functions
-    void setWatches(const Watches& _w);
-    void removeWatches();
-    void updateWatches(int _iScopeLvl = -1);
-    Watches& getWatches();
-
     //actions called by debuggers
     inline void setStepIn() //enter macro
     {
index 65ad7ab..d910d76 100644 (file)
@@ -298,39 +298,6 @@ Breakpoints& DebuggerManager::getAllBreakPoint()
     return breakpoints;
 }
 
-void DebuggerManager::setWatches(const Watches& _w)
-{
-    watches.clear();
-    watches = _w;
-}
-
-void DebuggerManager::removeWatches()
-{
-    watches.clear();
-}
-
-void DebuggerManager::updateWatches(int _iScopeLvl)
-{
-    symbol::Context* pCtx = symbol::Context::getInstance();
-    if(_iScopeLvl < 0)
-    {
-        // get current scope lvl
-        _iScopeLvl = pCtx->getScopeLevel();
-    }
-
-    for(auto& w : watches)
-    {
-        w.second = pCtx->getAtLevel(symbol::Symbol(scilab::UTF8::toWide(w.first)), _iScopeLvl);
-    }
-}
-
-Watches& DebuggerManager::getWatches()
-{
-    return watches;
-}
-
-
-
 void DebuggerManager::generateCallStack()
 {
     clearCallStack();
@@ -495,8 +462,6 @@ void DebuggerManager::abort() //abort execution
 
 void DebuggerManager::internal_execution_released()
 {
-    // update watches at each execution released
-    updateWatches();
     // send execution finished
     sendExecutionReleased();
 }
@@ -505,7 +470,6 @@ void DebuggerManager::internal_stop()
 {
     interrupted = true;
     generateCallStack();
-    updateWatches();
     pause();
     //clean current seqexp
     interrupted = false;