[nemiver] Update BP saving into session (Closes: #595083)



commit 0bdda59dbd3a6c271c7942f18a52fe4b4ed47305
Author: Dodji Seketeli <dodji redhat com>
Date:   Tue Sep 15 16:06:36 2009 +0200

    Update BP saving into session (Closes: #595083)
    
    	* src/dbgengine/nmv-i-debugger.h:
    	(IDebugger::BreakPoint::is_read_watchpoint,
    	IDebugger::BreakPoint::is_write_watchpoint): New entry points.
    	* src/persp/dbgperspective/nmv-dbg-perspective.cc:
    	(DBGPerspective::record_and_save_session): Save breakpoint ignore
    	count in the session.Schedule watchpoints to be recorded in the session.
    	(DBGPerspective::execute_session): Load the watchpoints and set
    	them.
    	(DBGPerspective::append_breakpoints): Do not discriminate the type of
    	breakpoint to add to the perspective at this point.
    	(DBGPerspective::append_breakpoint): Watchpoints being special type of
    	breakpoints, they should be added to the list of breakpoints as well.
    	Though, only standard types of breakpoints should be visually added to
    	the source editor.
    	(DBGPerspective::execute_program): Set breakpoints ignore counts on
    	breakpoints.
    	* src/persp/dbgperspective/nmv-sess-mgr.h:
    	(ISessMgr::BreakPoint::ignore_count): New method.
    	(ISessMgr::WatchPoint): New type.
    	(ISessMgr::Session::watchpoints): New method.
    	* src/persp/dbgperspective/nmv-sess-mgr.cc:
    	(SessMgr::store_session): Save breakpoint ignore count and
    	watchpoints in the session DB.
    	(SessMgr::load_session): Load breakpoints ignore count and
    	watchpoints from the session DB.
    	* src/persp/dbgperspective/sqlscripts/sqlite/create-tables.sql:
    	Bumped schema version number to 1.4. Add new watchpoints table, add
    	ignorecount column to the breakpoints table.
    	* src/persp/dbgperspective/sqlscripts/sqlite/drop-tables.sql: Add
    	watchpoints table to the list of tables to drop.

 src/dbgengine/nmv-i-debugger.h                     |   10 ++
 src/persp/dbgperspective/nmv-dbg-perspective.cc    |   95 +++++++++++++------
 src/persp/dbgperspective/nmv-sess-mgr.cc           |  103 +++++++++++++++-----
 src/persp/dbgperspective/nmv-sess-mgr.h            |   64 +++++++++++--
 .../sqlscripts/sqlite/create-tables.sql            |   11 ++-
 .../sqlscripts/sqlite/drop-tables.sql              |    1 +
 6 files changed, 224 insertions(+), 60 deletions(-)
---
diff --git a/src/dbgengine/nmv-i-debugger.h b/src/dbgengine/nmv-i-debugger.h
index 8f489fd..6383d41 100644
--- a/src/dbgengine/nmv-i-debugger.h
+++ b/src/dbgengine/nmv-i-debugger.h
@@ -99,6 +99,8 @@ public:
         int m_line;
         int m_nb_times_hit;
         int m_ignore_count;
+        bool m_is_read_watchpoint;
+        bool m_is_write_watchpoint;
 
     public:
         BreakPoint () {clear ();}
@@ -141,6 +143,12 @@ public:
         int ignore_count () const {return m_ignore_count;}
         void ignore_count (int a) {m_ignore_count = a;}
 
+        bool is_read_watchpoint () const {return m_is_read_watchpoint;}
+        void is_read_watchpoint (bool f) {m_is_read_watchpoint = f;}
+
+        bool is_write_watchpoint () const {return m_is_write_watchpoint;}
+        void is_write_watchpoint (bool f) {m_is_write_watchpoint = f;}
+
         bool is_pending ()
         {
             if (m_address == "<PENDING>") {
@@ -168,6 +176,8 @@ public:
             m_condition.clear ();
             m_nb_times_hit = 0;
             m_ignore_count = 0;
+            m_is_read_watchpoint = false;
+            m_is_write_watchpoint = false;
         }
     };//end class BreakPoint
 
diff --git a/src/persp/dbgperspective/nmv-dbg-perspective.cc b/src/persp/dbgperspective/nmv-dbg-perspective.cc
index 0dd827b..d953b78 100644
--- a/src/persp/dbgperspective/nmv-dbg-perspective.cc
+++ b/src/persp/dbgperspective/nmv-dbg-perspective.cc
@@ -4597,18 +4597,33 @@ DBGPerspective::record_and_save_session (ISessMgr::Session &a_session)
         a_session.opened_files ().push_back (path_iter->first);
     }
 
+    // Record regular breakpoints and watchpoints in the session
     a_session.breakpoints ().clear ();
+    a_session.watchpoints ().clear ();
     map<int, IDebugger::BreakPoint>::const_iterator break_iter;
     for (break_iter = m_priv->breakpoints.begin ();
          break_iter != m_priv->breakpoints.end ();
          ++break_iter) {
-        ISessMgr::BreakPoint bp (break_iter->second.file_name (),
-                                 break_iter->second.file_full_name (),
-                                 break_iter->second.line (),
-                                 break_iter->second.enabled (),
-                                 break_iter->second.condition ());
-        a_session.breakpoints ().push_back (bp);
+        if (break_iter->second.type ()
+            == IDebugger::BreakPoint::STANDARD_BREAKPOINT_TYPE) {
+            ISessMgr::BreakPoint bp (break_iter->second.file_name (),
+                                     break_iter->second.file_full_name (),
+                                     break_iter->second.line (),
+                                     break_iter->second.enabled (),
+                                     break_iter->second.condition (),
+                                     break_iter->second.ignore_count ());
+            a_session.breakpoints ().push_back (bp);
+            LOG_DD ("Regular breakpoint scheduled to be stored");
+        } else if (break_iter->second.type ()
+                   == IDebugger::BreakPoint::WATCHPOINT_TYPE) {
+            ISessMgr::WatchPoint wp (break_iter->second.expression (),
+                                     break_iter->second.is_write_watchpoint (),
+                                     break_iter->second.is_read_watchpoint ());
+            a_session.watchpoints ().push_back (wp);
+            LOG_DD ("Watchpoint scheduled to be stored");
+        }
     }
+
     THROW_IF_FAIL (session_manager_ptr ());
 
     a_session.search_paths ().clear ();
@@ -5200,8 +5215,8 @@ DBGPerspective::execute_session (ISessMgr::Session &a_session)
 
     IDebugger::BreakPoint breakpoint;
     vector<IDebugger::BreakPoint> breakpoints;
-    list<ISessMgr::BreakPoint>::const_iterator it;
-    for (it = m_priv->session.breakpoints ().begin ();
+    for (list<ISessMgr::BreakPoint>::const_iterator it =
+             m_priv->session.breakpoints ().begin ();
          it != m_priv->session.breakpoints ().end ();
          ++it) {
         breakpoint.clear ();
@@ -5210,6 +5225,19 @@ DBGPerspective::execute_session (ISessMgr::Session &a_session)
         breakpoint.file_full_name (it->file_full_name ());
         breakpoint.enabled (it->enabled ());
         breakpoint.condition (it->condition ());
+        breakpoint.ignore_count (it->ignore_count ());
+        breakpoints.push_back (breakpoint);
+    }
+
+    for (list<ISessMgr::WatchPoint>::const_iterator it =
+           m_priv->session.watchpoints ().begin ();
+         it != m_priv->session.watchpoints ().end ();
+         ++it) {
+        breakpoint.clear ();
+        breakpoint.type (IDebugger::BreakPoint::WATCHPOINT_TYPE);
+        breakpoint.expression (it->expression ());
+        breakpoint.is_read_watchpoint (it->is_read ());
+        breakpoint.is_write_watchpoint (it->is_write ());
         breakpoints.push_back (breakpoint);
     }
 
@@ -5341,6 +5369,8 @@ DBGPerspective::execute_program
                          bool a_check_is_new_program,
                          bool a_close_opened_files)
 {
+    LOG_FUNCTION_SCOPE_NORMAL_DD
+
     NEMIVER_TRY
 
     THROW_IF_FAIL (m_priv);
@@ -5398,6 +5428,7 @@ DBGPerspective::execute_program
     bool is_new_program = (a_check_is_new_program) ?
                                 (prog != m_priv->prog_path)
                                 : true;
+    LOG_DD ("is new prog: " << is_new_program);
 
     // delete old breakpoints, if any.
     if (is_new_program) {
@@ -5419,6 +5450,7 @@ DBGPerspective::execute_program
 
     clear_status_notebook ();
 
+    LOG_DD ("load program");
     // now really load the inferior program (i.e: the one to be debugged)
     dbg_engine->load_program (prog, a_args, a_cwd, source_search_dirs,
                               get_terminal ().slave_pts_name ());
@@ -5443,16 +5475,23 @@ DBGPerspective::execute_program
                 // in the 'cookie' to determine which breakpoint
                 // needs to be disabling after it is set.
                 UString cookie =
-                    it->enabled()
+                    it->enabled ()
                     ? ""
                     : "initially-disabled#"
                        + it->file_full_name ()
                        + "#"
                        + UString::from_int(it->line ());
-                dbg_engine->set_breakpoint (it->file_full_name (),
-                                            it->line (),
-                                            it->condition (),
-                                            cookie);
+                if (it->type ()
+                    == IDebugger::BreakPoint::STANDARD_BREAKPOINT_TYPE)
+                    dbg_engine->set_breakpoint (it->file_full_name (),
+                                                it->line (),
+                                                it->condition (),
+                                                it->ignore_count (),
+                                                cookie);
+                else if (it->type () == IDebugger::BreakPoint::WATCHPOINT_TYPE)
+                    dbg_engine->set_watchpoint (it->expression (),
+                                                it->is_write_watchpoint (),
+                                                it->is_read_watchpoint ());
             }
         }
     }
@@ -5763,10 +5802,13 @@ DBGPerspective::append_breakpoint (int a_bp_num,
 {
     UString file_path;
     file_path = a_breakpoint.file_full_name ();
-    //if the file full path info is not present,
-    //1/ lookup in the files opened in the perspective already.
-    //2/ lookup in the list of source directories
-    if (file_path == "") {
+    IDebugger::BreakPoint::Type type = a_breakpoint.type ();
+
+    // If the file full path info is not present,
+    // 1/ lookup in the files opened in the perspective already.
+    // 2/ lookup in the list of source directories
+    if (type == IDebugger::BreakPoint::STANDARD_BREAKPOINT_TYPE
+        && file_path == "") {
         UString file_name = a_breakpoint.file_name ();
         LOG_DD ("no full path info present for file '"
                 + file_name + "'");
@@ -5788,8 +5830,12 @@ DBGPerspective::append_breakpoint (int a_bp_num,
             << a_breakpoint.line () - 1);
     m_priv->breakpoints[a_bp_num] = a_breakpoint;
     m_priv->breakpoints[a_bp_num].file_full_name (file_path);
-    append_visual_breakpoint (file_path, a_breakpoint.line () - 1,
-                              a_breakpoint.enabled ());
+    // Append the visual representation of the breakpoint if it's a standard
+    // breakpoint, i.e. not a watchpoint. We don't have any visual
+    // representation of watchpoints yet.
+    if (type == IDebugger::BreakPoint::STANDARD_BREAKPOINT_TYPE)
+        append_visual_breakpoint (file_path, a_breakpoint.line () - 1,
+                                  a_breakpoint.enabled ());
 }
 
 void
@@ -5799,15 +5845,8 @@ DBGPerspective::append_breakpoints
     LOG_FUNCTION_SCOPE_NORMAL_DD;
 
     map<int, IDebugger::BreakPoint>::const_iterator iter;
-    for (iter = a_breaks.begin (); iter != a_breaks.end (); ++iter) {
-        // If the breakpoint is a standard one (e.g. not a watchpoint), add
-        // its visual representation.
-        // We don't have any visual representation for watchpoints yet.
-        if (iter->second.type ()
-            == IDebugger::BreakPoint::STANDARD_BREAKPOINT_TYPE) {
-            append_breakpoint (iter->first, iter->second);
-        }
-    }
+    for (iter = a_breaks.begin (); iter != a_breaks.end (); ++iter)
+        append_breakpoint (iter->first, iter->second);
 }
 
 bool
diff --git a/src/persp/dbgperspective/nmv-sess-mgr.cc b/src/persp/dbgperspective/nmv-sess-mgr.cc
index 40be845..38f8297 100644
--- a/src/persp/dbgperspective/nmv-sess-mgr.cc
+++ b/src/persp/dbgperspective/nmv-sess-mgr.cc
@@ -43,7 +43,7 @@ using nemiver::common::ConnectionManager;
 using nemiver::common::Transaction;
 using nemiver::common::SQLStatement;
 
-static const char *REQUIRED_DB_SCHEMA_VERSION = "1.3";
+static const char *REQUIRED_DB_SCHEMA_VERSION = "1.4";
 static const char *DB_FILE_NAME = "nemivercommon.db";
 
 NEMIVER_BEGIN_NAMESPACE (nemiver)
@@ -262,15 +262,15 @@ SessMgr::store_session (Session &a_session,
 {
     THROW_IF_FAIL (m_priv);
 
-    //The next line starts a transaction.
-    //If we get off from this function without reaching
-    //the trans.end() call, every db request we made gets rolled back.
+    // The next line starts a transaction.
+    // If we get off from this function without reaching
+    // the trans.end() call, every db request we made gets rolled back.
     TransactionAutoHelper trans (a_trans);
 
     UString query;
     if (!a_session.session_id ()) {
-        //insert the session id in the sessions table, and get the session id
-        //we just inerted
+        // insert the session id in the sessions table, and get the session id
+        // we just inerted
         query = "insert into sessions values(NULL)";
         THROW_IF_FAIL2
             (trans.get ().get_connection ().execute_statement (query),
@@ -289,7 +289,7 @@ SessMgr::store_session (Session &a_session,
         a_session.session_id (session_id);
     }
 
-    //store the properties
+    // store the properties
     query = "delete from attributes where sessionid = "
             + UString::from_int (a_session.session_id ());
     THROW_IF_FAIL (trans.get ().get_connection ().execute_statement (query));
@@ -308,7 +308,7 @@ SessMgr::store_session (Session &a_session,
                 (trans.get ().get_connection ().execute_statement (query));
     }
 
-    //store the environment variables
+    // store the environment variables
     query = "delete from env_variables where sessionid = "
             + UString::from_int (a_session.session_id ());
     THROW_IF_FAIL (trans.get ().get_connection ().execute_statement (query));
@@ -327,7 +327,7 @@ SessMgr::store_session (Session &a_session,
                 (trans.get ().get_connection ().execute_statement (query));
     }
 
-    //store the breakpoints
+    // store the breakpoints
     query = "delete from breakpoints where sessionid = "
             + UString::from_int (a_session.session_id ());
     THROW_IF_FAIL
@@ -345,13 +345,38 @@ SessMgr::store_session (Session &a_session,
                 + break_iter->file_full_name () + "', "
                 + UString::from_int (break_iter->line_number ()) + ", "
                 + UString::from_int (break_iter->enabled ()) + ", "
-                + "'" + condition + "')";
+                + "'" + condition + "'" + ", "
+                + UString::from_int (break_iter->ignore_count ())
+                + ")";
         LOG_DD ("query: " << query);
         THROW_IF_FAIL
                 (trans.get ().get_connection ().execute_statement (query));
     }
 
-    //store the opened files
+    // store the watchpoints
+    query = "delete from watchpoints where sessionid = "
+            + UString::from_int (a_session.session_id ());
+    THROW_IF_FAIL
+            (trans.get ().get_connection ().execute_statement (query));
+
+    list<SessMgr::WatchPoint>::const_iterator watch_iter;
+    for (watch_iter = a_session.watchpoints ().begin ();
+         watch_iter != a_session.watchpoints ().end ();
+         ++watch_iter) {
+        UString expression = watch_iter->expression ();
+        expression.chomp ();
+        query = "insert into watchpoints values(NULL, "
+                + UString::from_int (a_session.session_id ()) + ", '"
+                + expression + "', "
+                + UString::from_int (watch_iter->is_read ()) + ", "
+                + UString::from_int (watch_iter->is_write ())
+                + ")";
+        LOG_DD ("query: " << query);
+        THROW_IF_FAIL
+                (trans.get ().get_connection ().execute_statement (query));
+    }
+
+    // store the opened files
     query = "delete from openedfiles where sessionid = "
             + UString::from_int (a_session.session_id ());
     THROW_IF_FAIL (trans.get ().get_connection ().execute_statement (query));
@@ -369,7 +394,7 @@ SessMgr::store_session (Session &a_session,
                 (trans.get ().get_connection ().execute_statement (query));
     }
 
-    //store the search paths
+    // store the search paths
     query = "delete from searchpaths where sessionid = "
             + UString::from_int (a_session.session_id ());
     THROW_IF_FAIL (trans.get ().get_connection ().execute_statement (query));
@@ -413,15 +438,16 @@ SessMgr::load_session (Session &a_session,
     Session session;
     session.session_id (a_session.session_id ());
 
-    //The next line starts a transaction.
-    //If we get off from this function without reaching
-    //the trans.end() call, every db request we made gets rolled back.
+    // The next line starts a transaction.
+    // If we get off from this function without reaching
+    // the trans.end() call, every db request we made gets rolled back.
     TransactionAutoHelper trans (a_trans);
 
-    //load the attributes
+    // load the attributes
     UString query="select attributes.name, attributes.value "
                   "from attributes where attributes.sessionid = "
                   + UString::from_int (a_session.session_id ());
+    LOG_DD ("query: " << query);
     THROW_IF_FAIL (trans.get ().get_connection ().execute_statement (query));
     while (trans.get ().get_connection ().read_next_row ()) {
         UString name, value;
@@ -432,10 +458,11 @@ SessMgr::load_session (Session &a_session,
         session.properties ()[name] = value;
     }
 
-    //load the environment variables
+    // load the environment variables
     query = "select env_variables.name, env_variables.value "
             "from env_variables where env_variables.sessionid = "
                   + UString::from_int (a_session.session_id ());
+    LOG_DD ("query: " << query);
     THROW_IF_FAIL (trans.get ().get_connection ().execute_statement (query));
     while (trans.get ().get_connection ().read_next_row ()) {
         UString name, value;
@@ -446,15 +473,17 @@ SessMgr::load_session (Session &a_session,
         session.env_variables ()[name] = value;
     }
 
-    //load the breakpoints
+    // load the breakpoints
     query = "select breakpoints.filename, breakpoints.filefullname, "
             "breakpoints.linenumber, breakpoints.enabled, "
-            "breakpoints.condition from "
+            "breakpoints.condition, breakpoints.ignorecount from "
             "breakpoints where breakpoints.sessionid = "
             + UString::from_int (session.session_id ());
+    LOG_DD ("query: " << query);
     THROW_IF_FAIL (trans.get ().get_connection ().execute_statement (query));
     while (trans.get ().get_connection ().read_next_row ()) {
-        UString filename, filefullname, linenumber, enabled, condition;
+        UString filename, filefullname, linenumber,
+                enabled, condition, ignorecount;
         THROW_IF_FAIL (trans.get ().get_connection ().get_column_content
                                                             (0, filename));
         THROW_IF_FAIL (trans.get ().get_connection ().get_column_content
@@ -466,14 +495,42 @@ SessMgr::load_session (Session &a_session,
         THROW_IF_FAIL (trans.get ().get_connection ().get_column_content
                                                             (4, condition));
         condition.chomp ();
+        THROW_IF_FAIL (trans.get ().get_connection ().get_column_content
+                                                            (5, ignorecount));
+        LOG_DD ("filename, filefullname, linenumber, enabled, "
+                "condition, ignorecount:\n"
+                << filename << "," << filefullname << ","
+                << linenumber << "," << enabled << ","
+                << condition<< "," << ignorecount);
         session.breakpoints ().push_back (SessMgr::BreakPoint (filename,
                                                                filefullname,
                                                                linenumber,
                                                                enabled,
-                                                               condition));
+                                                               condition,
+                                                               ignorecount));
+    }
+
+    // load the watchpoints
+    query = "select watchpoints.expression, watchpoints.iswrite, "
+            "watchpoints.isread from watchpoints where watchpoints.sessionid = "
+            + UString::from_int (session.session_id ());
+    LOG_DD ("query: " << query);
+    THROW_IF_FAIL (trans.get ().get_connection ().execute_statement (query));
+    while (trans.get ().get_connection ().read_next_row ()) {
+        UString expression;
+        gint64 is_write = false, is_read = false;
+        THROW_IF_FAIL (trans.get ().get_connection ().get_column_content
+                                                            (0, expression));
+        THROW_IF_FAIL (trans.get ().get_connection ().get_column_content
+                                                        (1, is_write));
+        THROW_IF_FAIL (trans.get ().get_connection ().get_column_content
+                                                            (2, is_read));
+        session.watchpoints ().push_back (SessMgr::WatchPoint (expression,
+                                                               is_write,
+                                                               is_read));
     }
 
-    //load the search paths
+    // load the search paths
     query = "select searchpaths.path from "
             "searchpaths where searchpaths.sessionid = "
             + UString::from_int (session.session_id ());
@@ -485,7 +542,7 @@ SessMgr::load_session (Session &a_session,
         session.search_paths ().push_back (path);
     }
 
-    //load the opened files
+    // load the opened files
     query = "select openedfiles.filename from openedfiles where "
             "openedfiles.sessionid = "
             + UString::from_int (session.session_id ());
diff --git a/src/persp/dbgperspective/nmv-sess-mgr.h b/src/persp/dbgperspective/nmv-sess-mgr.h
index 883f99e..527d1d9 100644
--- a/src/persp/dbgperspective/nmv-sess-mgr.h
+++ b/src/persp/dbgperspective/nmv-sess-mgr.h
@@ -61,34 +61,40 @@ public:
         int m_line_number;
         bool m_enabled;
         UString m_condition;
+        int m_ignore_count;
 
     public:
         BreakPoint (const UString &a_file_name,
                     const UString &a_file_full_name,
                     const UString &a_line_number,
                     const UString &a_enabled,
-                    const UString &a_condition) :
+                    const UString &a_condition,
+                    const UString &a_ignore_count) :
             m_file_name (a_file_name),
             m_file_full_name (a_file_full_name),
             m_line_number (atoi (a_line_number.c_str ())),
             m_enabled (atoi (a_enabled.c_str ())),
-            m_condition (a_condition)
+            m_condition (a_condition),
+            m_ignore_count (atoi (a_ignore_count.c_str ()))
         {}
 
         BreakPoint (const UString &a_file_name,
                     const UString &a_file_full_name,
                     int a_line_number,
                     bool a_enabled,
-                    const UString &a_condition) :
+                    const UString &a_condition,
+                    unsigned a_ignore_count) :
             m_file_name (a_file_name),
             m_file_full_name (a_file_full_name),
             m_line_number (a_line_number),
             m_enabled (a_enabled),
-            m_condition (a_condition)
+            m_condition (a_condition),
+            m_ignore_count (a_ignore_count)
         {}
 
         BreakPoint () :
-            m_line_number (0)
+            m_line_number (0),
+            m_ignore_count (0)
         {}
 
         const UString& file_name () const {return m_file_name;}
@@ -105,13 +111,51 @@ public:
 
         const UString& condition () const {return m_condition;}
         void condition (const UString &a_cond) {m_condition = a_cond;}
+
+        int ignore_count () const {return m_ignore_count;}
+        void ignore_count (int a_c) {m_ignore_count = a_c;}
     };
 
+    class WatchPoint {
+        UString m_expression;
+        bool m_is_write;
+        bool m_is_read;
+
+    public:
+        WatchPoint (const UString &a_expression,
+                    bool a_is_write,
+                    bool a_is_read) :
+            m_expression (a_expression),
+            m_is_write (a_is_write),
+            m_is_read (a_is_read)
+        {
+        }
+
+        WatchPoint (const UString &a_expression,
+                    UString &a_is_write,
+                    UString &a_is_read) :
+            m_expression (a_expression),
+            m_is_write (a_is_write == "true" ? true : false),
+            m_is_read (a_is_read == "true" ? true : false)
+        {
+        }
+
+        const UString& expression () const {return m_expression;}
+        void expression (const UString &a_expr) {m_expression = a_expr;}
+
+        bool is_write () const {return m_is_write;}
+        void is_write (bool f) {m_is_write = f;}
+
+        bool is_read () const {return m_is_read;}
+        void is_read (bool f)  {m_is_read = f;}
+    }; // end class WatchPoint
+
     class Session {
         gint64 m_session_id;
         map<UString, UString> m_properties;
         map<UString, UString> m_env_variables;
         list<BreakPoint> m_breakpoints;
+        list<WatchPoint> m_watchpoints;
         list<UString> m_opened_files;
         list<UString> m_search_paths;
 
@@ -130,11 +174,17 @@ public:
         const map<UString, UString>& properties ()  const {return m_properties;}
         map<UString, UString>& properties () {return m_properties;}
 
-        const map<UString, UString>& env_variables ()  const {return m_env_variables;}
+        const map<UString, UString>& env_variables ()  const
+        {
+            return m_env_variables;
+        }
         map<UString, UString>& env_variables () {return m_env_variables;}
 
         list<BreakPoint>& breakpoints () {return m_breakpoints;}
-        const list<BreakPoint>& breakpoints () const { return m_breakpoints; }
+        const list<BreakPoint>& breakpoints () const { return m_breakpoints;}
+
+        list<WatchPoint>& watchpoints () {return m_watchpoints;}
+        const list<WatchPoint>& watchpoints () const {return m_watchpoints;}
 
         list<UString>& opened_files () {return m_opened_files;}
         const list<UString>& opened_files () const {return m_opened_files;}
diff --git a/src/persp/dbgperspective/sqlscripts/sqlite/create-tables.sql b/src/persp/dbgperspective/sqlscripts/sqlite/create-tables.sql
index d1756f9..cf530bb 100644
--- a/src/persp/dbgperspective/sqlscripts/sqlite/create-tables.sql
+++ b/src/persp/dbgperspective/sqlscripts/sqlite/create-tables.sql
@@ -1,6 +1,6 @@
 create table schemainfo (version text not null) ;
 
-insert into schemainfo (version) values ('1.3') ;
+insert into schemainfo (version) values ('1.4') ;
 
 create table sessions (id integer primary key) ;
 
@@ -20,7 +20,14 @@ create table breakpoints (id integer primary key,
                           filefullname text,
                           linenumber integer,
                           enabled integer,
-                          condition text) ;
+                          condition text,
+                          ignorecount integer) ;
+
+create table watchpoints (id integer primary key,
+                          sessionid integer,
+                          expression text,
+                          iswrite integer,
+                          isread integer);
 
 create table openedfiles (id integer primary key,
                           sessionid integer,
diff --git a/src/persp/dbgperspective/sqlscripts/sqlite/drop-tables.sql b/src/persp/dbgperspective/sqlscripts/sqlite/drop-tables.sql
index bdb59b6..67aeaae 100644
--- a/src/persp/dbgperspective/sqlscripts/sqlite/drop-tables.sql
+++ b/src/persp/dbgperspective/sqlscripts/sqlite/drop-tables.sql
@@ -3,6 +3,7 @@ drop table sessions  ;
 drop table env_variables ;
 drop table attributes;
 drop table breakpoints;
+drop table watchpoints;
 drop table openedfiles;
 drop table searchpaths;
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]