nemiver r873 - in trunk: . src/dbgengine src/persp/dbgperspective src/persp/dbgperspective/glade src/persp/dbgperspective/sqlscripts/sqlite tests



Author: dodji
Date: Sun Jun 22 20:07:28 2008
New Revision: 873
URL: http://svn.gnome.org/viewvc/nemiver?rev=873&view=rev

Log:
add support for conditional breakpoints


Modified:
   trunk/ChangeLog
   trunk/src/dbgengine/nmv-gdb-engine.cc
   trunk/src/dbgengine/nmv-gdb-engine.h
   trunk/src/dbgengine/nmv-gdbmi-parser.cc
   trunk/src/dbgengine/nmv-i-debugger.h
   trunk/src/persp/dbgperspective/glade/chooseoverloadsdialog.glade
   trunk/src/persp/dbgperspective/glade/setbreakpointdialog.glade
   trunk/src/persp/dbgperspective/nmv-breakpoints-view.cc
   trunk/src/persp/dbgperspective/nmv-call-stack.cc
   trunk/src/persp/dbgperspective/nmv-dbg-perspective.cc
   trunk/src/persp/dbgperspective/nmv-dbg-perspective.h
   trunk/src/persp/dbgperspective/nmv-find-text-dialog.cc
   trunk/src/persp/dbgperspective/nmv-local-vars-inspector.cc
   trunk/src/persp/dbgperspective/nmv-local-vars-inspector2.cc
   trunk/src/persp/dbgperspective/nmv-memory-view.cc
   trunk/src/persp/dbgperspective/nmv-registers-view.cc
   trunk/src/persp/dbgperspective/nmv-sess-mgr.cc
   trunk/src/persp/dbgperspective/nmv-sess-mgr.h
   trunk/src/persp/dbgperspective/nmv-set-breakpoint-dialog.cc
   trunk/src/persp/dbgperspective/nmv-set-breakpoint-dialog.h
   trunk/src/persp/dbgperspective/nmv-thread-list.cc
   trunk/src/persp/dbgperspective/sqlscripts/sqlite/create-tables.sql
   trunk/tests/fooprog.cc
   trunk/tests/test-breakpoint.cc
   trunk/tests/test-core.cc
   trunk/tests/test-deref.cc
   trunk/tests/test-local-vars-list.cc
   trunk/tests/test-var-list.cc
   trunk/tests/test-var-walker.cc

Modified: trunk/src/dbgengine/nmv-gdb-engine.cc
==============================================================================
--- trunk/src/dbgengine/nmv-gdb-engine.cc	(original)
+++ trunk/src/dbgengine/nmv-gdb-engine.cc	Sun Jun 22 20:07:28 2008
@@ -146,7 +146,7 @@
 
     mutable sigc::signal<void, IDebugger::StopReason,
                          bool, const IDebugger::Frame&,
-                         int, const UString&> stopped_signal;
+                         int, int, const UString&> stopped_signal;
 
     mutable sigc::signal<void,
                          const list<int>,
@@ -1077,15 +1077,18 @@
         if (a_in.has_command ()) {}
 
         int thread_id = m_out_of_band_record.thread_id ();
+        int breakpoint_number = -1;
+        IDebugger::StopReason reason = m_out_of_band_record.stop_reason ();
+        if (reason == IDebugger::BREAKPOINT_HIT)
+            breakpoint_number = m_out_of_band_record.breakpoint_number ();
 
         m_engine->stopped_signal ().emit
                     (m_out_of_band_record.stop_reason (),
                      m_out_of_band_record.has_frame (),
                      m_out_of_band_record.frame (),
-                     thread_id,
+                     thread_id, breakpoint_number,
                      a_in.command ().cookie ());
 
-        IDebugger::StopReason reason = m_out_of_band_record.stop_reason ();
 
         if (reason == IDebugger::EXITED_SIGNALLED
             || reason == IDebugger::EXITED_NORMALLY
@@ -2353,7 +2356,7 @@
 
 sigc::signal<void, IDebugger::StopReason,
              bool, const IDebugger::Frame&,
-             int, const UString&>&
+             int, int, const UString&>&
 GDBEngine::stopped_signal () const
 {
     return m_priv->stopped_signal;
@@ -2559,9 +2562,12 @@
                               bool a_has_frame,
                               const IDebugger::Frame &a_frame,
                               int a_thread_id,
+                              int a_bkpt_num,
                               const UString &a_cookie)
 {
-    if (a_has_frame || a_frame.line () || a_thread_id || a_cookie.empty ()) {
+    if (a_has_frame || a_frame.line ()
+        || a_thread_id || a_cookie.empty ()
+        || a_bkpt_num) {
         //keep compiler happy
     }
 
@@ -2861,6 +2867,7 @@
 void
 GDBEngine::set_breakpoint (const UString &a_path,
                            gint a_line_num,
+                           const UString &a_condition,
                            const UString &a_cookie)
 {
     LOG_FUNCTION_SCOPE_NORMAL_DD;
@@ -2871,11 +2878,37 @@
     //read http://sourceware.org/gdb/current/onlinedocs/gdb_6.html#SEC33
     //Also, we don't neet to explicitely 'set breakpoint pending' to have it
     //work. Even worse, setting it doesn't work.
-    queue_command (Command ("set-breakpoint", "break "
-                    + a_path
-                    + ":"
-                    + UString::from_int (a_line_num),
-                    a_cookie));
+    UString break_cmd ("break ");
+    if (!a_path.empty ()) {
+        break_cmd += a_path + ":";
+    }
+    break_cmd += UString::from_int (a_line_num);
+    if (!a_condition.empty ()) {
+        LOG_DD ("setting breakpoint with condition: " << a_condition);
+        break_cmd += " if " + a_condition;
+    } else {
+        LOG_DD ("setting breakpoint without condition");
+    }
+    queue_command (Command ("set-breakpoint", break_cmd, a_cookie));
+    list_breakpoints (a_cookie);
+}
+
+void
+GDBEngine::set_breakpoint (const UString &a_func_name,
+                           const UString &a_condition,
+                           const UString &a_cookie)
+{
+    LOG_FUNCTION_SCOPE_NORMAL_DD;
+    THROW_IF_FAIL (m_priv);
+    UString break_cmd;
+    break_cmd += "break " + a_func_name;
+    if (!a_condition.empty ()) {
+        LOG_DD ("setting breakpoint with condition: " << a_condition);
+        break_cmd += " if " + a_condition;
+    } else {
+        LOG_DD ("setting breakpoint without condition");
+    }
+    queue_command (Command ("set-breakpoint", break_cmd, a_cookie));
     list_breakpoints (a_cookie);
 }
 
@@ -2904,17 +2937,6 @@
     }
 }
 
-void
-GDBEngine::set_breakpoint (const UString &a_func_name,
-                           const UString &a_cookie)
-{
-    LOG_FUNCTION_SCOPE_NORMAL_DD;
-    THROW_IF_FAIL (m_priv);
-    queue_command (Command ("set-breakpoint",
-                            "break " + a_func_name,
-                            a_cookie));
-    list_breakpoints (a_cookie);
-}
 
 void
 GDBEngine::set_catch (const UString &a_event,

Modified: trunk/src/dbgengine/nmv-gdb-engine.h
==============================================================================
--- trunk/src/dbgengine/nmv-gdb-engine.h	(original)
+++ trunk/src/dbgengine/nmv-gdb-engine.h	Sun Jun 22 20:07:28 2008
@@ -89,6 +89,7 @@
                 bool,
                 const IDebugger::Frame&,
                 int,
+                int,
                 const UString& /*cookie*/>& stopped_signal () const ;
 
     sigc::signal<void,
@@ -186,6 +187,7 @@
                             bool has_frame,
                             const IDebugger::Frame &a_frame,
                             int a_thread_id,
+                            int a_breakpoint_number,
                             const UString &a_cookie);
     void on_detached_from_target_signal ();
 
@@ -276,15 +278,17 @@
 
     void set_breakpoint (const UString &a_path,
                          gint a_line_num,
+                         const UString &a_condition,
+                         const UString &a_cookie)  ;
+
+    void set_breakpoint (const UString &a_func_name,
+                         const UString &a_condition,
                          const UString &a_cookie)  ;
 
     void list_breakpoints (const UString &a_cookie) ;
 
     map<int, IDebugger::BreakPoint>& get_cached_breakpoints () ;
 
-    void set_breakpoint (const UString &a_func_name,
-                         const UString &a_cookie)  ;
-
     void set_catch (const UString &a_event,
 					const UString &a_cookie)  ;
 

Modified: trunk/src/dbgengine/nmv-gdbmi-parser.cc
==============================================================================
--- trunk/src/dbgengine/nmv-gdbmi-parser.cc	(original)
+++ trunk/src/dbgengine/nmv-gdbmi-parser.cc	Sun Jun 22 20:07:28 2008
@@ -285,6 +285,10 @@
     a_bkpt.file_name (attrs["file"]); //may be nil
     a_bkpt.file_full_name (attrs["fullname"]); //may be nil
     a_bkpt.line (atoi (attrs["line"].c_str ())); //may be nil
+    if ((iter = attrs.find ("cond")) != null_iter) {
+        a_bkpt.condition (iter->second);
+    }
+    a_bkpt.nb_times_hit (atoi (attrs["times"].c_str ()));
     //TODO: get the 'at' attribute that is present on targets that
     //are not compiled with -g.
     a_to = cur;

Modified: trunk/src/dbgengine/nmv-i-debugger.h
==============================================================================
--- trunk/src/dbgengine/nmv-i-debugger.h	(original)
+++ trunk/src/dbgengine/nmv-i-debugger.h	Sun Jun 22 20:07:28 2008
@@ -84,6 +84,8 @@
         UString m_file_name;
         UString m_file_full_name;
         int m_line;
+        UString m_condition;
+        int m_nb_times_hit;
 
     public:
 
@@ -113,6 +115,14 @@
         int line () const {return m_line;}
         void line (int a_in) {m_line = a_in;}
 
+        const UString& condition () const {return m_condition;}
+        void condition (const UString &a_cond) {m_condition = a_cond;}
+
+        bool has_condition () const {return !m_condition.empty ();}
+
+        int nb_times_hit () const {return m_nb_times_hit;}
+        void nb_times_hit (int a_nb) {m_nb_times_hit = a_nb;}
+
         bool is_pending ()
         {
             if (m_address == "<PENDING>") {
@@ -127,11 +137,13 @@
         {
             m_number = 0;
             m_enabled = false;
-            m_address = "";
-            m_function = "";
-            m_file_name = "";
-            m_file_full_name = "";
+            m_address.clear ();
+            m_function.clear ();
+            m_file_name.clear ();
+            m_file_full_name.clear ();
             m_line = 0;
+            m_condition.clear ();
+            m_nb_times_hit = 0;
         }
     };//end class BreakPoint
 
@@ -551,6 +563,9 @@
                          bool /*has frame*/,
                          const IDebugger::Frame&/*the frame*/,
                          int /*thread id*/,
+                         int /*breakpoint number,
+                               meaningfull only when
+                               reason == IDebugger::BREAKPOINT_HIT*/,
                          const UString& /*cookie*/>& stopped_signal () const=0;
 
     virtual sigc::signal<void,
@@ -737,8 +752,10 @@
                                        const UString &a_cookie="") = 0;
     virtual void set_breakpoint (const UString &a_path,
                                  gint a_line_num,
+                                 const UString &a_condition="",
                                  const UString &a_cookie="") = 0;
     virtual void set_breakpoint (const UString &a_func_name,
+                                 const UString &a_condition="",
                                  const UString &a_cookie="") = 0;
     virtual void set_catch (const UString &a_event,
                             const UString &a_cookie="") = 0;

Modified: trunk/src/persp/dbgperspective/glade/chooseoverloadsdialog.glade
==============================================================================
--- trunk/src/persp/dbgperspective/glade/chooseoverloadsdialog.glade	(original)
+++ trunk/src/persp/dbgperspective/glade/chooseoverloadsdialog.glade	Sun Jun 22 20:07:28 2008
@@ -1,158 +1,106 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd";>
-
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
+<!--*- mode: xml -*-->
 <glade-interface>
-
-<widget class="GtkDialog" id="chooseoverloadsdialog">
-  <property name="visible">True</property>
-  <property name="title" translatable="yes">Set Breakpoint</property>
-  <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
-  <property name="modal">True</property>
-  <property name="default_width">400</property>
-  <property name="default_height">300</property>
-  <property name="resizable">True</property>
-  <property name="destroy_with_parent">False</property>
-  <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">True</property>
-  <property name="skip_pager_hint">True</property>
-  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
-  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-  <property name="focus_on_map">True</property>
-  <property name="urgency_hint">False</property>
-  <property name="has_separator">False</property>
-
-  <child internal-child="vbox">
-    <widget class="GtkVBox" id="dialog-vbox1">
-      <property name="visible">True</property>
-      <property name="homogeneous">False</property>
-      <property name="spacing">0</property>
-
-      <child internal-child="action_area">
-	<widget class="GtkHButtonBox" id="dialog-action_area1">
-	  <property name="visible">True</property>
-	  <property name="layout_style">GTK_BUTTONBOX_END</property>
-
-	  <child>
-	    <widget class="GtkButton" id="cancelbutton">
-	      <property name="visible">True</property>
-	      <property name="can_default">True</property>
-	      <property name="has_default">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-cancel</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <property name="response_id">-6</property>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="okbutton">
-	      <property name="visible">True</property>
-	      <property name="can_default">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-ok</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <property name="response_id">-5</property>
-	    </widget>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">False</property>
-	  <property name="fill">True</property>
-	  <property name="pack_type">GTK_PACK_END</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkVBox" id="treeviewcontainer">
-	  <property name="border_width">6</property>
-	  <property name="visible">True</property>
-	  <property name="homogeneous">False</property>
-	  <property name="spacing">6</property>
-
-	  <child>
-	    <widget class="GtkLabel" id="label1">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">&lt;b&gt;Choose Overloaded Function&lt;/b&gt;</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">True</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">0</property>
-	      <property name="ypad">0</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkLabel" id="label2">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Multiple functions match the specified name. Please choose one from the list below.</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">False</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">True</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">0</property>
-	      <property name="ypad">0</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkScrolledWindow" id="treeviewscrolledwindow">
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-	      <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-	      <property name="shadow_type">GTK_SHADOW_IN</property>
-	      <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
-	      <child>
-		<placeholder/>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-    </widget>
-  </child>
-</widget>
-
+  <widget class="GtkDialog" id="chooseoverloadsdialog">
+    <property name="visible">True</property>
+    <property name="title" translatable="yes">Set Breakpoint</property>
+    <property name="modal">True</property>
+    <property name="default_width">400</property>
+    <property name="default_height">300</property>
+    <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+    <property name="skip_taskbar_hint">True</property>
+    <property name="skip_pager_hint">True</property>
+    <property name="has_separator">False</property>
+    <child internal-child="vbox">
+      <widget class="GtkVBox" id="dialog-vbox1">
+        <property name="visible">True</property>
+        <child>
+          <widget class="GtkVBox" id="treeviewcontainer">
+            <property name="visible">True</property>
+            <property name="border_width">6</property>
+            <property name="spacing">6</property>
+            <child>
+              <widget class="GtkLabel" id="label1">
+                <property name="visible">True</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">&lt;b&gt;Choose Overloaded Function&lt;/b&gt;</property>
+                <property name="use_markup">True</property>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkLabel" id="label2">
+                <property name="visible">True</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">Multiple functions match the specified name. Please choose one from the list below.</property>
+                <property name="wrap">True</property>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkScrolledWindow" id="treeviewscrolledwindow">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+                <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+                <property name="shadow_type">GTK_SHADOW_IN</property>
+                <child>
+                  <placeholder/>
+                </child>
+              </widget>
+              <packing>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child internal-child="action_area">
+          <widget class="GtkHButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="layout_style">GTK_BUTTONBOX_END</property>
+            <child>
+              <widget class="GtkButton" id="cancelbutton">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="label">gtk-cancel</property>
+                <property name="use_stock">True</property>
+                <property name="response_id">-6</property>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkButton" id="okbutton">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="label">gtk-ok</property>
+                <property name="use_stock">True</property>
+                <property name="response_id">-5</property>
+              </widget>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="pack_type">GTK_PACK_END</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+  </widget>
 </glade-interface>

Modified: trunk/src/persp/dbgperspective/glade/setbreakpointdialog.glade
==============================================================================
--- trunk/src/persp/dbgperspective/glade/setbreakpointdialog.glade	(original)
+++ trunk/src/persp/dbgperspective/glade/setbreakpointdialog.glade	Sun Jun 22 20:07:28 2008
@@ -1,376 +1,270 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd";>
-
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
+<!--*- mode: xml -*-->
 <glade-interface>
-
-<widget class="GtkDialog" id="setbreakpointdialog">
-  <property name="visible">True</property>
-  <property name="title" translatable="yes">Set Breakpoint</property>
-  <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
-  <property name="modal">False</property>
-  <property name="default_width">300</property>
-  <property name="resizable">True</property>
-  <property name="destroy_with_parent">False</property>
-  <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">False</property>
-  <property name="skip_pager_hint">False</property>
-  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
-  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-  <property name="focus_on_map">True</property>
-  <property name="urgency_hint">False</property>
-  <property name="has_separator">False</property>
-
-  <child internal-child="vbox">
-    <widget class="GtkVBox" id="dialog-vbox">
-      <property name="visible">True</property>
-      <property name="homogeneous">False</property>
-      <property name="spacing">6</property>
-
-      <child internal-child="action_area">
-	<widget class="GtkHButtonBox" id="dialog-action_area">
-	  <property name="visible">True</property>
-	  <property name="layout_style">GTK_BUTTONBOX_END</property>
-
-	  <child>
-	    <widget class="GtkButton" id="cancelbutton">
-	      <property name="visible">True</property>
-	      <property name="can_default">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-cancel</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <property name="response_id">-6</property>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkButton" id="okbutton">
-	      <property name="visible">True</property>
-	      <property name="can_default">True</property>
-	      <property name="has_default">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label">gtk-ok</property>
-	      <property name="use_stock">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	      <property name="response_id">-5</property>
-	    </widget>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">False</property>
-	  <property name="fill">True</property>
-	  <property name="pack_type">GTK_PACK_END</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkVBox" id="vbox3">
-	  <property name="border_width">6</property>
-	  <property name="visible">True</property>
-	  <property name="homogeneous">False</property>
-	  <property name="spacing">6</property>
-
-	  <child>
-	    <widget class="GtkLabel" id="label7">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">&lt;b&gt;Set a Breakpoint:&lt;/b&gt;</property>
-	      <property name="use_underline">False</property>
-	      <property name="use_markup">True</property>
-	      <property name="justify">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap">False</property>
-	      <property name="selectable">False</property>
-	      <property name="xalign">0</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xpad">0</property>
-	      <property name="ypad">0</property>
-	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-	      <property name="width_chars">-1</property>
-	      <property name="single_line_mode">False</property>
-	      <property name="angle">0</property>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkAlignment" id="alignment2">
-	      <property name="visible">True</property>
-	      <property name="xalign">0.5</property>
-	      <property name="yalign">0.5</property>
-	      <property name="xscale">1</property>
-	      <property name="yscale">1</property>
-	      <property name="top_padding">0</property>
-	      <property name="bottom_padding">0</property>
-	      <property name="left_padding">0</property>
-	      <property name="right_padding">0</property>
-
-	      <child>
-		<widget class="GtkTable" id="table4">
-		  <property name="visible">True</property>
-		  <property name="n_rows">7</property>
-		  <property name="n_columns">2</property>
-		  <property name="homogeneous">False</property>
-		  <property name="row_spacing">6</property>
-		  <property name="column_spacing">6</property>
-
-		  <child>
-		    <widget class="GtkRadioButton" id="radiobutton_function_name">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">F_unction Name:</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">False</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">0</property>
-		      <property name="bottom_attach">1</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label_function">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Function:</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">1</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="mnemonic_widget">entry_filename</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkEntry" id="entry_function">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="editable">True</property>
-		      <property name="visibility">True</property>
-		      <property name="max_length">0</property>
-		      <property name="text" translatable="yes"></property>
-		      <property name="has_frame">True</property>
-		      <property name="invisible_char">â</property>
-		      <property name="activates_default">True</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">1</property>
-		      <property name="bottom_attach">2</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkRadioButton" id="radiobutton_source_location">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">_Source Location</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">False</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <property name="group">radiobutton_function_name</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">2</property>
-		      <property name="bottom_attach">3</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label_filename">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Filename:</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">1</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="mnemonic_widget">entry_filename</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">3</property>
-		      <property name="bottom_attach">4</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkEntry" id="entry_filename">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="editable">True</property>
-		      <property name="visibility">True</property>
-		      <property name="max_length">0</property>
-		      <property name="text" translatable="yes"></property>
-		      <property name="has_frame">True</property>
-		      <property name="invisible_char">â</property>
-		      <property name="activates_default">True</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">3</property>
-		      <property name="bottom_attach">4</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkLabel" id="label_line">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Line:</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">1</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		      <property name="mnemonic_widget">entry_line</property>
-		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		      <property name="width_chars">-1</property>
-		      <property name="single_line_mode">False</property>
-		      <property name="angle">0</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">1</property>
-		      <property name="top_attach">4</property>
-		      <property name="bottom_attach">5</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkEntry" id="entry_line">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="editable">True</property>
-		      <property name="visibility">True</property>
-		      <property name="max_length">0</property>
-		      <property name="text" translatable="yes"></property>
-		      <property name="has_frame">True</property>
-		      <property name="invisible_char">â</property>
-		      <property name="activates_default">True</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">4</property>
-		      <property name="bottom_attach">5</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkRadioButton" id="radiobutton_event">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">_Event:</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		      <property name="active">False</property>
-		      <property name="inconsistent">False</property>
-		      <property name="draw_indicator">True</property>
-		      <property name="group">radiobutton_function_name</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">0</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">5</property>
-		      <property name="bottom_attach">6</property>
-		      <property name="x_options">fill</property>
-		      <property name="y_options"></property>
-		    </packing>
-		  </child>
-
-		  <child>
-		    <widget class="GtkComboBox" id="combo_event">
-		      <property name="visible">True</property>
-		      <property name="items" translatable="yes"></property>
-		      <property name="add_tearoffs">False</property>
-		      <property name="focus_on_click">True</property>
-		    </widget>
-		    <packing>
-		      <property name="left_attach">1</property>
-		      <property name="right_attach">2</property>
-		      <property name="top_attach">6</property>
-		      <property name="bottom_attach">7</property>
-		      <property name="x_options">fill</property>
-		    </packing>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">False</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-    </widget>
-  </child>
-</widget>
-
+  <widget class="GtkDialog" id="setbreakpointdialog">
+    <property name="visible">True</property>
+    <property name="title" translatable="yes">Set Breakpoint</property>
+    <property name="default_width">300</property>
+    <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+    <property name="has_separator">False</property>
+    <child internal-child="vbox">
+      <widget class="GtkVBox" id="dialog-vbox">
+        <property name="visible">True</property>
+        <property name="spacing">6</property>
+        <child>
+          <widget class="GtkVBox" id="vbox3">
+            <property name="visible">True</property>
+            <property name="border_width">6</property>
+            <property name="spacing">6</property>
+            <child>
+              <widget class="GtkLabel" id="label7">
+                <property name="visible">True</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">&lt;b&gt;Set a Breakpoint:&lt;/b&gt;</property>
+                <property name="use_markup">True</property>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkAlignment" id="alignment2">
+                <property name="visible">True</property>
+                <child>
+                  <widget class="GtkTable" id="table4">
+                    <property name="visible">True</property>
+                    <property name="n_rows">8</property>
+                    <property name="n_columns">2</property>
+                    <property name="column_spacing">6</property>
+                    <property name="row_spacing">6</property>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <widget class="GtkRadioButton" id="functionnameradio">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="label" translatable="yes">F_unction Name:</property>
+                        <property name="use_underline">True</property>
+                        <property name="response_id">0</property>
+                        <property name="draw_indicator">True</property>
+                      </widget>
+                      <packing>
+                        <property name="right_attach">2</property>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label_function">
+                        <property name="visible">True</property>
+                        <property name="xalign">1</property>
+                        <property name="label" translatable="yes">Function:</property>
+                        <property name="mnemonic_widget">filenameentry</property>
+                      </widget>
+                      <packing>
+                        <property name="top_attach">1</property>
+                        <property name="bottom_attach">2</property>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkEntry" id="functionentry">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="invisible_char">â</property>
+                        <property name="activates_default">True</property>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="top_attach">1</property>
+                        <property name="bottom_attach">2</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkRadioButton" id="sourcelocationradio">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="label" translatable="yes">_Source Location</property>
+                        <property name="use_underline">True</property>
+                        <property name="response_id">0</property>
+                        <property name="draw_indicator">True</property>
+                        <property name="group">functionnameradio</property>
+                      </widget>
+                      <packing>
+                        <property name="right_attach">2</property>
+                        <property name="top_attach">2</property>
+                        <property name="bottom_attach">3</property>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label_filename">
+                        <property name="visible">True</property>
+                        <property name="xalign">1</property>
+                        <property name="label" translatable="yes">Filename:</property>
+                        <property name="mnemonic_widget">filenameentry</property>
+                      </widget>
+                      <packing>
+                        <property name="top_attach">3</property>
+                        <property name="bottom_attach">4</property>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkEntry" id="filenameentry">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="invisible_char">â</property>
+                        <property name="activates_default">True</property>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="top_attach">3</property>
+                        <property name="bottom_attach">4</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label_line">
+                        <property name="visible">True</property>
+                        <property name="xalign">1</property>
+                        <property name="label" translatable="yes">Line:</property>
+                        <property name="mnemonic_widget">lineentry</property>
+                      </widget>
+                      <packing>
+                        <property name="top_attach">4</property>
+                        <property name="bottom_attach">5</property>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkEntry" id="lineentry">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="invisible_char">â</property>
+                        <property name="activates_default">True</property>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="top_attach">4</property>
+                        <property name="bottom_attach">5</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkRadioButton" id="eventradio">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="label" translatable="yes">_Event:</property>
+                        <property name="use_underline">True</property>
+                        <property name="response_id">0</property>
+                        <property name="draw_indicator">True</property>
+                        <property name="group">functionnameradio</property>
+                      </widget>
+                      <packing>
+                        <property name="right_attach">2</property>
+                        <property name="top_attach">5</property>
+                        <property name="bottom_attach">6</property>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkComboBox" id="combo_event">
+                        <property name="visible">True</property>
+                        <property name="items" translatable="yes"></property>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="top_attach">6</property>
+                        <property name="bottom_attach">7</property>
+                        <property name="x_options">GTK_FILL</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkLabel" id="label1">
+                        <property name="visible">True</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">Condition:</property>
+                      </widget>
+                      <packing>
+                        <property name="top_attach">7</property>
+                        <property name="bottom_attach">8</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkEntry" id="conditionentry">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                      </widget>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="top_attach">7</property>
+                        <property name="bottom_attach">8</property>
+                      </packing>
+                    </child>
+                  </widget>
+                </child>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child internal-child="action_area">
+          <widget class="GtkHButtonBox" id="dialog-action_area">
+            <property name="visible">True</property>
+            <property name="layout_style">GTK_BUTTONBOX_END</property>
+            <child>
+              <widget class="GtkButton" id="cancelbutton">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="label">gtk-cancel</property>
+                <property name="use_stock">True</property>
+                <property name="response_id">-6</property>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkButton" id="okbutton">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="label">gtk-ok</property>
+                <property name="use_stock">True</property>
+                <property name="response_id">-5</property>
+              </widget>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="pack_type">GTK_PACK_END</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+  </widget>
 </glade-interface>

Modified: trunk/src/persp/dbgperspective/nmv-breakpoints-view.cc
==============================================================================
--- trunk/src/persp/dbgperspective/nmv-breakpoints-view.cc	(original)
+++ trunk/src/persp/dbgperspective/nmv-breakpoints-view.cc	Sun Jun 22 20:07:28 2008
@@ -42,6 +42,8 @@
     Gtk::TreeModelColumn<Glib::ustring> filename ;
     Gtk::TreeModelColumn<Glib::ustring> function ;
     Gtk::TreeModelColumn<int> line ;
+    Gtk::TreeModelColumn<Glib::ustring> condition;
+    Gtk::TreeModelColumn<int> hits;
     Gtk::TreeModelColumn<IDebugger::BreakPoint> breakpoint ;
 
     BPColumns ()
@@ -53,6 +55,8 @@
         add (function) ;
         add (line) ;
         add (breakpoint) ;
+        add (condition);
+        add (hits);
     }
 };//end Cols
 
@@ -107,6 +111,8 @@
                 (*this, &Priv::on_debugger_breakpoint_deleted_signal)) ;
         debugger->breakpoints_set_signal ().connect (sigc::mem_fun
                 (*this, &Priv::on_debugger_breakpoints_set_signal)) ;
+        debugger->stopped_signal ().connect (sigc::mem_fun
+                (*this, &Priv::on_debugger_stopped_signal));
         breakpoints_menu = load_menu ("breakpointspopup.xml",
                 "/BreakpointsPopup");
     }
@@ -126,6 +132,8 @@
         tree_view->append_column (_("Line"), get_bp_columns ().line) ;
         tree_view->append_column (_("Function"), get_bp_columns ().function) ;
         tree_view->append_column (_("Address"), get_bp_columns ().address) ;
+        tree_view->append_column (_("Condition"), get_bp_columns ().condition);
+        tree_view->append_column (_("Hits"), get_bp_columns ().hits);
         Gtk::CellRendererToggle *enabled_toggle =
             dynamic_cast<Gtk::CellRendererToggle*>
                                     (tree_view->get_column_cell_renderer(0));
@@ -170,10 +178,12 @@
                 Gtk::TreeModel::iterator tree_iter =
                     find_breakpoint_in_model(breakmap_iter->second);
                 if (tree_iter) {
-                    LOG_DD ("Updating breakpoint " << breakmap_iter->second.number ());
-                    update_breakpoint(tree_iter, breakmap_iter->second);
+                    LOG_DD ("Updating breakpoint "
+                            << breakmap_iter->second.number ());
+                    update_breakpoint (tree_iter, breakmap_iter->second);
                 } else {
-                    LOG_DD ("Adding breakpoint " << breakmap_iter->second.number ());
+                    LOG_DD ("Adding breakpoint "
+                            << breakmap_iter->second.number ());
                     append_breakpoint(breakmap_iter->second);
                 }
             }
@@ -233,6 +243,8 @@
         (*a_iter)[get_bp_columns ().address] = a_breakpoint.address () ;
         (*a_iter)[get_bp_columns ().filename] = a_breakpoint.file_name ();
         (*a_iter)[get_bp_columns ().line] = a_breakpoint.line ();
+        (*a_iter)[get_bp_columns ().condition] = a_breakpoint.condition ();
+        (*a_iter)[get_bp_columns ().hits] = a_breakpoint.nb_times_hit ();
     }
 
     Gtk::TreeModel::iterator append_breakpoint
@@ -254,6 +266,21 @@
         NEMIVER_CATCH
     }
 
+    void on_debugger_stopped_signal (IDebugger::StopReason a_reason,
+                                     bool /*a_has_frame*/,
+                                     const IDebugger::Frame &/*a_frame*/,
+                                     int /*a_thread_id*/,
+                                     int /*a_bkpt_num*/,
+                                     const UString &/*a_cookie*/)
+    {
+        NEMIVER_TRY
+        if (a_reason == IDebugger::BREAKPOINT_HIT) {
+            LOG_DD ("listing breakpoints ...");
+            debugger->list_breakpoints ();
+        }
+        NEMIVER_CATCH
+    }
+
     void on_debugger_breakpoint_deleted_signal
             (const IDebugger::BreakPoint &a_break, int a_break_number,
              const UString &a_cookie)

Modified: trunk/src/persp/dbgperspective/nmv-call-stack.cc
==============================================================================
--- trunk/src/persp/dbgperspective/nmv-call-stack.cc	(original)
+++ trunk/src/persp/dbgperspective/nmv-call-stack.cc	Sun Jun 22 20:07:28 2008
@@ -234,6 +234,7 @@
                                      bool a_has_frame,
                                      const IDebugger::Frame &a_frame,
                                      int a_thread_id,
+                                     int a_bp_num,
                                      const UString &a_cookie)
     {
         LOG_FUNCTION_SCOPE_NORMAL_DD ;
@@ -241,7 +242,8 @@
         NEMIVER_TRY
         LOG_DD ("stopped, reason: " << a_reason) ;
 
-        if (a_has_frame || a_frame.line () || a_thread_id || a_cookie.empty ()) {}
+        if (a_has_frame || a_frame.line () || a_thread_id
+            || a_bp_num || a_cookie.empty ()) {}
 
         if (a_reason == IDebugger::EXITED_SIGNALLED
             || a_reason == IDebugger::EXITED_NORMALLY

Modified: trunk/src/persp/dbgperspective/nmv-dbg-perspective.cc
==============================================================================
--- trunk/src/persp/dbgperspective/nmv-dbg-perspective.cc	(original)
+++ trunk/src/persp/dbgperspective/nmv-dbg-perspective.cc	Sun Jun 22 20:07:28 2008
@@ -314,6 +314,7 @@
                                      bool a_has_frame,
                                      const IDebugger::Frame &,
                                      int a_thread_id,
+                                     int,
                                      const UString&) ;
     void on_program_finished_signal () ;
     void on_frame_selected_signal (int, const IDebugger::Frame &);
@@ -470,8 +471,10 @@
     void do_continue_until () ;
     void set_breakpoint () ;
     void set_breakpoint (const UString &a_file,
-                         int a_line) ;
-
+                         int a_line,
+                         const UString &a_cond) ;
+    void set_breakpoint (const UString &a_func_name,
+                         const UString &a_cond) ;
     void append_breakpoint (int a_bp_num,
                             const IDebugger::BreakPoint &a_breakpoint) ;
     void append_breakpoints
@@ -2032,12 +2035,10 @@
 DBGPerspective::on_debugger_stopped_signal (IDebugger::StopReason a_reason,
                                             bool a_has_frame,
                                             const IDebugger::Frame &a_frame,
-                                            int a_thread_id,
-                                            const UString &a_cookie)
+                                            int , int, const UString &)
 {
 
     LOG_FUNCTION_SCOPE_NORMAL_DD ;
-    if (a_thread_id || a_cookie.empty ()) {}
 
     NEMIVER_TRY
 
@@ -3904,7 +3905,9 @@
     UString today ;
     dateutils::get_current_datetime (today) ;
     session_name += "-" + today ;
-a_session.properties ().clear () ; a_session.properties ()[SESSION_NAME] = session_name ; a_session.properties ()[PROGRAM_NAME] = m_priv->prog_path ;
+    a_session.properties ().clear () ;
+    a_session.properties ()[SESSION_NAME] = session_name ;
+    a_session.properties ()[PROGRAM_NAME] = m_priv->prog_path ;
     a_session.properties ()[PROGRAM_ARGS] = m_priv->prog_args ;
     a_session.properties ()[PROGRAM_CWD] = m_priv->prog_cwd ;
     GTimeVal timeval;
@@ -3927,11 +3930,12 @@
     for (break_iter = m_priv->breakpoints.begin ();
          break_iter != m_priv->breakpoints.end ();
          ++break_iter) {
-        a_session.breakpoints ().push_back
-            (ISessMgr::BreakPoint (break_iter->second.file_name (),
-                                   break_iter->second.file_full_name (),
-                                   break_iter->second.line (),
-                                   break_iter->second.enabled ())) ;
+        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);
     }
     THROW_IF_FAIL (session_manager_ptr ()) ;
 
@@ -4458,6 +4462,7 @@
         breakpoint.file_name (it->file_name ()) ;
         breakpoint.file_full_name (it->file_full_name ()) ;
         breakpoint.enabled (it->enabled ()) ;
+        breakpoint.condition (it->condition ());
         breakpoints.push_back (breakpoint) ;
     }
 
@@ -4466,16 +4471,14 @@
     m_priv->search_paths.clear();
     for (path_iter = m_priv->session.search_paths ().begin ();
             path_iter != m_priv->session.search_paths ().end ();
-            ++path_iter)
-    {
+            ++path_iter) {
         m_priv->search_paths.push_back (*path_iter);
     }
 
     // open the previously opened files
     for (path_iter = m_priv->session.opened_files ().begin ();
             path_iter != m_priv->session.opened_files ().end ();
-            ++path_iter)
-    {
+            ++path_iter) {
         open_file(*path_iter);
     }
 
@@ -4602,6 +4605,7 @@
                 it->file_full_name () + "#" + UString::from_int(it->line ());
             dbg_engine->set_breakpoint (it->file_full_name (),
                                         it->line (),
+                                        it->condition (),
                                         cookie) ;
         }
     }
@@ -4855,15 +4859,33 @@
     gint current_line =
         source_editor->source_view ().get_source_buffer ()->get_insert
             ()->get_iter ().get_line () + 1;
-    set_breakpoint (path, current_line) ;
+    set_breakpoint (path, current_line, "") ;
 }
 
 void
 DBGPerspective::set_breakpoint (const UString &a_file_path,
-                                int a_line)
+                                int a_line,
+                                const UString &a_condition)
 {
-    LOG_DD ("set bkpoint request for " << a_file_path << ":" << a_line) ;
-    debugger ()->set_breakpoint (a_file_path, a_line) ;
+    LOG_DD ("set bkpoint request for " << a_file_path << ":" << a_line
+            << " condition: '" << a_condition << "'") ;
+        // only try to set the breakpoint if it's a reasonable value
+        if (a_line && a_line != INT_MAX && a_line != INT_MIN) {
+            debugger ()->set_breakpoint (a_file_path, a_line, a_condition) ;
+        } else {
+            LOG_ERROR ("invalid line number: " << a_line);
+            UString msg;
+            msg.printf (_("Invalid line number: %i"), a_line);
+            display_warning (msg);
+        }
+}
+
+void
+DBGPerspective::set_breakpoint (const UString &a_func_name,
+                                const UString &a_condition)
+{
+    LOG_DD ("set bkpoint request in func" << a_func_name) ;
+    debugger ()->set_breakpoint (a_func_name, a_condition) ;
 }
 
 void
@@ -5260,7 +5282,7 @@
         delete_breakpoint (a_file_path, a_line_num) ;
     } else {
         LOG_DD ("breakpoint no set yet, set it!") ;
-        set_breakpoint (a_file_path, a_line_num) ;
+        set_breakpoint (a_file_path, a_line_num, "") ;
     }
 }
 
@@ -5291,43 +5313,35 @@
         return;
     }
 
-    switch(dialog.mode ())
-    {
-    case SetBreakpointDialog::MODE_SOURCE_LOCATION:
-    {
-        UString filename;
-        filename = dialog.file_name () ;
-        THROW_IF_FAIL (filename != "") ;
-        int line = dialog.line_number () ;
-        LOG_DD ("setting breakpoint in file " << filename << " at line " << line) ;
-
-        // only try to set the breakpoint if it's a reasonable value
-        if (line && line != INT_MAX && line != INT_MIN) {
-            set_breakpoint (filename, line) ;
-        } else {
-            UString msg;
-            msg.printf (_("Invalid line number: %i"), line);
-            display_warning (msg);
-        }
-        break;
-    }
-    case SetBreakpointDialog::MODE_FUNCTION_NAME:
-    {
-        UString function = dialog.function ();
-        THROW_IF_FAIL (function != "") ;
-        debugger ()->set_breakpoint (function);
-        break;
-    }
-    case SetBreakpointDialog::MODE_EVENT:
-    {
-        UString event = dialog.event ();
-        THROW_IF_FAIL (event != "") ;
-        debugger ()->set_catch (event);
-        break;
-    }
-    default:
-        THROW_IF_FAIL (1);
-        break;
+    switch(dialog.mode ()) {
+        case SetBreakpointDialog::MODE_SOURCE_LOCATION:
+            {
+                UString filename;
+                filename = dialog.file_name () ;
+                THROW_IF_FAIL (filename != "") ;
+                int line = dialog.line_number () ;
+                LOG_DD ("setting breakpoint in file "
+                        << filename << " at line " << line) ;
+                set_breakpoint (filename, line, dialog.condition ());
+                break;
+            }
+        case SetBreakpointDialog::MODE_FUNCTION_NAME:
+            {
+                UString function = dialog.function ();
+                THROW_IF_FAIL (function != "") ;
+                set_breakpoint (function, dialog.condition ());
+                break;
+            }
+        case SetBreakpointDialog::MODE_EVENT:
+            {
+                UString event = dialog.event ();
+                THROW_IF_FAIL (event != "");
+                debugger ()->set_catch (event);
+                break;
+            }
+        default:
+            THROW ("should not be reached");
+            break;
     }
 }
 

Modified: trunk/src/persp/dbgperspective/nmv-dbg-perspective.h
==============================================================================
--- trunk/src/persp/dbgperspective/nmv-dbg-perspective.h	(original)
+++ trunk/src/persp/dbgperspective/nmv-dbg-perspective.h	Sun Jun 22 20:07:28 2008
@@ -107,7 +107,11 @@
     virtual void set_breakpoint () = 0;
 
     virtual void set_breakpoint (const UString &a_file,
-                                 int a_line) = 0;
+                                 int a_line,
+                                 const UString &a_condition="") = 0;
+
+    virtual void set_breakpoint (const UString &a_func_name,
+                                 const UString &a_condition="") = 0;
 
     virtual void append_breakpoints
             (const map<int, IDebugger::BreakPoint> &a_breaks) = 0 ;

Modified: trunk/src/persp/dbgperspective/nmv-find-text-dialog.cc
==============================================================================
--- trunk/src/persp/dbgperspective/nmv-find-text-dialog.cc	(original)
+++ trunk/src/persp/dbgperspective/nmv-find-text-dialog.cc	Sun Jun 22 20:07:28 2008
@@ -158,7 +158,8 @@
         THROW_IF_FAIL (search_button) ;
         get_search_text_combo ()->get_entry ()->signal_activate ().connect
             (sigc::mem_fun (*this, &Priv::on_search_entry_activated_signal)) ;
-        dialog.signal_show ().connect (sigc::mem_fun (*this, &Priv::on_dialog_show));
+        dialog.signal_show ().connect (sigc::mem_fun
+                                            (*this, &Priv::on_dialog_show));
         search_button->signal_clicked ().connect (sigc::mem_fun
                                     (*this, &Priv::on_search_button_clicked)) ;
     }

Modified: trunk/src/persp/dbgperspective/nmv-local-vars-inspector.cc
==============================================================================
--- trunk/src/persp/dbgperspective/nmv-local-vars-inspector.cc	(original)
+++ trunk/src/persp/dbgperspective/nmv-local-vars-inspector.cc	Sun Jun 22 20:07:28 2008
@@ -465,10 +465,12 @@
                             bool a_has_frame,
                             const IDebugger::Frame &a_frame,
                             int a_thread_id,
+                            int a_bp_num,
                             const UString &a_cookie)
     {
         LOG_FUNCTION_SCOPE_NORMAL_DD ;
-        if (a_frame.line () || a_thread_id || a_cookie.empty ()) {}
+        if (a_frame.line () || a_thread_id
+            || a_bp_num || a_cookie.empty ()) {}
 
         NEMIVER_TRY
         LOG_DD ("stopped, reason: " << a_reason) ;

Modified: trunk/src/persp/dbgperspective/nmv-local-vars-inspector2.cc
==============================================================================
--- trunk/src/persp/dbgperspective/nmv-local-vars-inspector2.cc	(original)
+++ trunk/src/persp/dbgperspective/nmv-local-vars-inspector2.cc	Sun Jun 22 20:07:28 2008
@@ -506,10 +506,12 @@
                             bool a_has_frame,
                             const IDebugger::Frame &a_frame,
                             int a_thread_id,
+                            int a_bp_num,
                             const UString &a_cookie)
     {
         LOG_FUNCTION_SCOPE_NORMAL_DD;
-        if (a_frame.line () || a_thread_id || a_cookie.empty ()) {}
+        if (a_frame.line () || a_thread_id
+            || a_bp_num || a_cookie.empty ()) {}
 
         NEMIVER_TRY
 

Modified: trunk/src/persp/dbgperspective/nmv-memory-view.cc
==============================================================================
--- trunk/src/persp/dbgperspective/nmv-memory-view.cc	(original)
+++ trunk/src/persp/dbgperspective/nmv-memory-view.cc	Sun Jun 22 20:07:28 2008
@@ -195,6 +195,7 @@
                               bool /*a_has_frame*/,
                               const IDebugger::Frame& /*a_frame*/,
                               int /*a_thread_id*/,
+                              int /*bp num*/,
                               const UString& /*a_cookie*/)
     {
         NEMIVER_TRY

Modified: trunk/src/persp/dbgperspective/nmv-registers-view.cc
==============================================================================
--- trunk/src/persp/dbgperspective/nmv-registers-view.cc	(original)
+++ trunk/src/persp/dbgperspective/nmv-registers-view.cc	Sun Jun 22 20:07:28 2008
@@ -107,6 +107,7 @@
                               bool,
                               const IDebugger::Frame &,
                               int,
+                              int,
                               const UString&)
     {
         if (a_reason == IDebugger::EXITED_SIGNALLED

Modified: trunk/src/persp/dbgperspective/nmv-sess-mgr.cc
==============================================================================
--- trunk/src/persp/dbgperspective/nmv-sess-mgr.cc	(original)
+++ trunk/src/persp/dbgperspective/nmv-sess-mgr.cc	Sun Jun 22 20:07:28 2008
@@ -39,7 +39,7 @@
 using nemiver::common::Transaction ;
 using nemiver::common::SQLStatement ;
 
-static const char *REQUIRED_DB_SCHEMA_VERSION = "1.2" ;
+static const char *REQUIRED_DB_SCHEMA_VERSION = "1.3" ;
 
 NEMIVER_BEGIN_NAMESPACE (nemiver)
 
@@ -245,9 +245,11 @@
         query = "select max(id) from sessions" ;
         THROW_IF_FAIL2 (trans.get ().get_connection ().execute_statement (query),
                         "failed to execute query: '" + query + "'") ;
+        LOG_DD ("query: " << query);
         THROW_IF_FAIL (trans.get ().get_connection ().read_next_row ()) ;
         gint64 session_id=0 ;
-        THROW_IF_FAIL (trans.get ().get_connection ().get_column_content (0, session_id)) ;
+        THROW_IF_FAIL
+            (trans.get ().get_connection ().get_column_content (0, session_id)) ;
         THROW_IF_FAIL (session_id) ;
         a_session.session_id (session_id) ;
     }
@@ -265,8 +267,8 @@
                 + UString::from_int (a_session.session_id ()) + ", '"
                 + prop_iter->first + "', '"
                 + prop_iter->second
-                + "')"
-                ;
+                + "')";
+        LOG_DD ("query: " << query);
         THROW_IF_FAIL (trans.get ().get_connection ().execute_statement (query));
     }
 
@@ -283,8 +285,8 @@
                 + UString::from_int (a_session.session_id ()) + ", '"
                 + var_iter->first + "', '"
                 + var_iter->second
-                + "')"
-                ;
+                + "')";
+        LOG_DD ("query: " << query);
         THROW_IF_FAIL (trans.get ().get_connection ().execute_statement (query));
     }
 
@@ -297,14 +299,16 @@
     for (break_iter = a_session.breakpoints ().begin ();
          break_iter != a_session.breakpoints ().end ();
          ++break_iter) {
+        UString condition = break_iter->condition ();
+        condition.chomp ();
         query = "insert into breakpoints values(NULL, "
                 + UString::from_int (a_session.session_id ()) + ", '"
                 + break_iter->file_name () + "', '"
                 + break_iter->file_full_name () + "', "
                 + UString::from_int (break_iter->line_number ()) + ", "
-                + UString::from_int (break_iter->enabled ())
-                + ")"
-                ;
+                + UString::from_int (break_iter->enabled ()) + ", "
+                + "'" + condition + "')";
+        LOG_DD ("query: " << query);
         THROW_IF_FAIL (trans.get ().get_connection ().execute_statement (query)) ;
     }
 
@@ -321,6 +325,7 @@
                 + UString::from_int (a_session.session_id ()) + ", '"
                 + *ofile_iter
                 + "')" ;
+        LOG_DD ("query: " << query);
         THROW_IF_FAIL (trans.get ().get_connection ().execute_statement (query)) ;
     }
 
@@ -337,6 +342,7 @@
                 + UString::from_int (a_session.session_id ()) + ", '"
                 + *path_iter
                 + "')" ;
+        LOG_DD ("query: " << query);
         THROW_IF_FAIL (trans.get ().get_connection ().execute_statement (query)) ;
     }
     trans.end () ;
@@ -378,32 +384,37 @@
     THROW_IF_FAIL (trans.get ().get_connection ().execute_statement (query)) ;
     while (trans.get ().get_connection ().read_next_row ()) {
         UString name, value ;
-        THROW_IF_FAIL (trans.get ().get_connection ().get_column_content (0, name)) ;
-        THROW_IF_FAIL (trans.get ().get_connection ().get_column_content (1, value)) ;
+        THROW_IF_FAIL
+            (trans.get ().get_connection ().get_column_content (0, name)) ;
+        THROW_IF_FAIL
+            (trans.get ().get_connection ().get_column_content (1, value)) ;
         session.properties ()[name] = value ;
     }
 
     //load the environment variables
-    query="select env_variables.name, env_variables.value "
-                  "from env_variables where env_variables.sessionid = "
+    query = "select env_variables.name, env_variables.value "
+            "from env_variables where env_variables.sessionid = "
                   + UString::from_int (a_session.session_id ());
     THROW_IF_FAIL (trans.get ().get_connection ().execute_statement (query)) ;
     while (trans.get ().get_connection ().read_next_row ()) {
         UString name, value ;
-        THROW_IF_FAIL (trans.get ().get_connection ().get_column_content (0, name)) ;
-        THROW_IF_FAIL (trans.get ().get_connection ().get_column_content (1, value)) ;
+        THROW_IF_FAIL
+            (trans.get ().get_connection ().get_column_content (0, name)) ;
+        THROW_IF_FAIL
+            (trans.get ().get_connection ().get_column_content (1, value)) ;
         session.env_variables ()[name] = value ;
     }
 
     //load the breakpoints
     query = "select breakpoints.filename, breakpoints.filefullname, "
-            "breakpoints.linenumber, breakpoints.enabled from "
+            "breakpoints.linenumber, breakpoints.enabled, "
+            "breakpoints.condition from "
             "breakpoints where breakpoints.sessionid = "
             + UString::from_int (session.session_id ())
             ;
     THROW_IF_FAIL (trans.get ().get_connection ().execute_statement (query)) ;
     while (trans.get ().get_connection ().read_next_row ()) {
-        UString filename, filefullname, linenumber, enabled;
+        UString filename, filefullname, linenumber, enabled, condition;
         THROW_IF_FAIL (trans.get ().get_connection ().get_column_content
                                                                 (0, filename));
         THROW_IF_FAIL (trans.get ().get_connection ().get_column_content
@@ -412,10 +423,14 @@
                                                                 (2, linenumber));
         THROW_IF_FAIL (trans.get ().get_connection ().get_column_content
                                                                 (3, enabled));
+        THROW_IF_FAIL (trans.get ().get_connection ().get_column_content
+                                                                (4, condition));
+        condition.chomp ();
         session.breakpoints ().push_back (SessMgr::BreakPoint (filename,
                                                                filefullname,
                                                                linenumber,
-                                                               enabled)) ;
+                                                               enabled,
+                                                               condition)) ;
     }
 
     //load the search paths

Modified: trunk/src/persp/dbgperspective/nmv-sess-mgr.h
==============================================================================
--- trunk/src/persp/dbgperspective/nmv-sess-mgr.h	(original)
+++ trunk/src/persp/dbgperspective/nmv-sess-mgr.h	Sun Jun 22 20:07:28 2008
@@ -33,53 +33,58 @@
 #include "common/nmv-transaction.h"
 #include "nmv-i-debugger.h"
 
-using namespace std ;
-using nemiver::common::Object ;
-using nemiver::common::UString ;
-using nemiver::common::ObjectRef ;
-using nemiver::common::ObjectUnref ;
-using nemiver::common::SafePtr ;
-using nemiver::common::Transaction ;
+using namespace std;
+using nemiver::common::Object;
+using nemiver::common::UString;
+using nemiver::common::ObjectRef;
+using nemiver::common::ObjectUnref;
+using nemiver::common::SafePtr;
+using nemiver::common::Transaction;
 
 NEMIVER_BEGIN_NAMESPACE (nemiver)
 
-class ISessMgr ;
-typedef SafePtr<ISessMgr, ObjectRef, ObjectUnref> ISessMgrSafePtr  ;
+class ISessMgr;
+typedef SafePtr<ISessMgr, ObjectRef, ObjectUnref> ISessMgrSafePtr ;
 
 class NEMIVER_API ISessMgr : public Object {
     //non copyable
-    ISessMgr (const ISessMgr&) ;
-    ISessMgr& operator= (const ISessMgr&) ;
+    ISessMgr (const ISessMgr&);
+    ISessMgr& operator= (const ISessMgr&);
 
 protected:
     ISessMgr () {};
 
 public:
     class BreakPoint {
-        UString m_file_name ;
-        UString m_file_full_name ;
-        int m_line_number ;
-        bool m_enabled ;
+        UString m_file_name;
+        UString m_file_full_name;
+        int m_line_number;
+        bool m_enabled;
+        UString m_condition;
 
     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_enabled,
+                    const UString &a_condition) :
             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_enabled (atoi (a_enabled.c_str ())),
+            m_condition (a_condition)
         {}
 
         BreakPoint (const UString &a_file_name,
                     const UString &a_file_full_name,
                     int a_line_number,
-                    bool a_enabled) :
+                    bool a_enabled,
+                    const UString &a_condition) :
             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_enabled (a_enabled),
+            m_condition (a_condition)
         {}
 
         BreakPoint () :
@@ -96,16 +101,19 @@
         void line_number (int a_in) {m_line_number = a_in;}
 
         bool enabled () const { return m_enabled; }
-        void enabled (bool a_in) { m_enabled = a_in; }
+        void enabled (bool a_in) { m_enabled = a_in;}
+
+        const UString& condition () const {return m_condition;}
+        void condition (const UString &a_cond) {m_condition = a_cond;}
     };
 
     class Session {
-        gint64 m_session_id ;
-        map<UString, UString> m_properties ;
-        map<UString, UString> m_env_variables ;
-        list<BreakPoint> m_breakpoints ;
-        list<UString> m_opened_files ;
-        list<UString> m_search_paths ;
+        gint64 m_session_id;
+        map<UString, UString> m_properties;
+        map<UString, UString> m_env_variables;
+        list<BreakPoint> m_breakpoints;
+        list<UString> m_opened_files;
+        list<UString> m_search_paths;
 
     public:
         Session () :
@@ -154,7 +162,7 @@
 
     virtual void clear_session (gint64 a_id, Transaction &a_trans) = 0;
     virtual void clear_session (gint64 a_id) = 0;
-    static ISessMgrSafePtr create (const UString &a_root_dir) ;
+    static ISessMgrSafePtr create (const UString &a_root_dir);
 };//end class SessMgr
 
 NEMIVER_END_NAMESPACE (nemiver)

Modified: trunk/src/persp/dbgperspective/nmv-set-breakpoint-dialog.cc
==============================================================================
--- trunk/src/persp/dbgperspective/nmv-set-breakpoint-dialog.cc	(original)
+++ trunk/src/persp/dbgperspective/nmv-set-breakpoint-dialog.cc	Sun Jun 22 20:07:28 2008
@@ -52,7 +52,7 @@
     Gtk::TreeModelColumn<Glib::ustring> m_label;
     Gtk::TreeModelColumn<UString> m_command;
 };
-    
+
 class SetBreakpointDialog::Priv {
 public:
     Gtk::ComboBox *combo_event ;
@@ -61,13 +61,15 @@
     Gtk::Entry *entry_filename ;
     Gtk::Entry *entry_line;
     Gtk::Entry *entry_function;
+    Gtk::Entry *entry_condition;
     Gtk::RadioButton *radio_source_location;
     Gtk::RadioButton *radio_function_name;
     Gtk::RadioButton *radio_event;
     Gtk::Button *okbutton ;
 
 public:
-    Priv (const Glib::RefPtr<Gnome::Glade::Xml> &a_glade) :
+    Priv (Gtk::Dialog &a_dialog,
+          const Glib::RefPtr<Gnome::Glade::Xml> &a_glade) :
         combo_event (0),
         entry_filename (0),
         entry_line (0),
@@ -77,63 +79,70 @@
         radio_event (0),
         okbutton (0)
     {
+        a_dialog.set_default_response (Gtk::RESPONSE_OK);
 
         okbutton =
             ui_utils::get_widget_from_glade<Gtk::Button> (a_glade, "okbutton") ;
         THROW_IF_FAIL (okbutton) ;
         okbutton->set_sensitive (false) ;
-        
+
         combo_event =
             ui_utils::get_widget_from_glade<Gtk::ComboBox>
             (a_glade, "combo_event") ;
         combo_event_model = Gtk::TreeStore::create(combo_event_col_model);
         combo_event->set_model(combo_event_model);
         Gtk::TreeModel::Row row;
-        
+
         row = *(combo_event_model->append());
         row[combo_event_col_model.m_label] = _("Throw Exception");
         row[combo_event_col_model.m_command] = "throw";
         row = *(combo_event_model->append());
         row[combo_event_col_model.m_label] = _("Catch Exception");
         row[combo_event_col_model.m_command] = "catch";
-        
+
         combo_event->set_active (0);
 
         entry_filename =
             ui_utils::get_widget_from_glade<Gtk::Entry>
-                (a_glade, "entry_filename") ;
+                (a_glade, "filenameentry") ;
         entry_filename->signal_changed ().connect (sigc::mem_fun
                 (*this, &Priv::on_text_changed_signal)) ;
 
         entry_line =
             ui_utils::get_widget_from_glade<Gtk::Entry>
-                (a_glade, "entry_line") ;
+                (a_glade, "lineentry") ;
         entry_line->signal_changed ().connect (sigc::mem_fun
                 (*this, &Priv::on_text_changed_signal)) ;
         entry_line->set_activates_default () ;
 
         entry_function =
             ui_utils::get_widget_from_glade<Gtk::Entry>
-                (a_glade, "entry_function") ;
+                (a_glade, "functionentry") ;
         entry_function->signal_changed ().connect (sigc::mem_fun
                 (*this, &Priv::on_text_changed_signal)) ;
         entry_function->set_activates_default () ;
 
+        entry_condition = ui_utils::get_widget_from_glade<Gtk::Entry>
+                (a_glade, "conditionentry");
+        entry_condition->signal_changed ().connect (sigc::mem_fun
+                (*this, &Priv::on_text_changed_signal));
+        entry_condition->set_activates_default ();
+
         radio_source_location =
             ui_utils::get_widget_from_glade<Gtk::RadioButton>
-                (a_glade, "radiobutton_source_location") ;
+                (a_glade, "sourcelocationradio") ;
         radio_source_location->signal_clicked ().connect (sigc::mem_fun
                 (*this, &Priv::on_radiobutton_changed)) ;
 
         radio_function_name =
             ui_utils::get_widget_from_glade<Gtk::RadioButton>
-                (a_glade, "radiobutton_function_name") ;
+                (a_glade, "functionnameradio") ;
         radio_function_name->signal_clicked ().connect (sigc::mem_fun
                 (*this, &Priv::on_radiobutton_changed)) ;
 
-        radio_event = 
+        radio_event =
             ui_utils::get_widget_from_glade<Gtk::RadioButton>
-            (a_glade, "radiobutton_event") ;
+            (a_glade, "eventradio") ;
         radio_event->signal_clicked ().connect (sigc::mem_fun
                 (*this, &Priv::on_radiobutton_changed)) ;
 
@@ -150,32 +159,31 @@
     {
         THROW_IF_FAIL (entry_filename) ;
         THROW_IF_FAIL (entry_line) ;
-        
+
         SetBreakpointDialog::Mode a_mode = mode ();
-        
-        switch (a_mode)
-        {
-        case MODE_SOURCE_LOCATION:
-            // make sure there's something in both entries
-            if (!entry_filename->get_text ().empty () &&
-                !entry_line->get_text ().empty () &&
-                // make sure the line number field is a valid number
-                atoi(entry_line->get_text ().c_str ())) {
-                okbutton->set_sensitive (true) ;
-            } else {
-                okbutton->set_sensitive (false) ;
-            }
-            break;
-        case MODE_FUNCTION_NAME:
-            if (!entry_function->get_text ().empty ()) {
+
+        switch (a_mode) {
+            case MODE_SOURCE_LOCATION:
+                // make sure there's something in both entries
+                if (!entry_filename->get_text ().empty () &&
+                    !entry_line->get_text ().empty () &&
+                    // make sure the line number field is a valid number
+                    atoi(entry_line->get_text ().c_str ())) {
+                    okbutton->set_sensitive (true) ;
+                } else {
+                    okbutton->set_sensitive (false) ;
+                }
+                break;
+            case MODE_FUNCTION_NAME:
+                if (!entry_function->get_text ().empty ()) {
+                    okbutton->set_sensitive (true) ;
+                } else {
+                    okbutton->set_sensitive (false) ;
+                }
+                break;
+            default:
                 okbutton->set_sensitive (true) ;
-            } else {
-                okbutton->set_sensitive (false) ;
-            }
-            break;
-        default:
-            okbutton->set_sensitive (true) ;
-            break;
+                break;
         }
     }
 
@@ -196,15 +204,15 @@
         THROW_IF_FAIL (entry_function) ;
 
         SetBreakpointDialog::Mode a_mode = mode ();
-        
+
         entry_function->set_sensitive (a_mode == MODE_FUNCTION_NAME);
         entry_filename->set_sensitive (a_mode == MODE_SOURCE_LOCATION);
         entry_line->set_sensitive (a_mode == MODE_SOURCE_LOCATION);
         combo_event->set_sensitive (a_mode == MODE_EVENT);
-        
-        switch( a_mode )
-        {
-        case MODE_SOURCE_LOCATION:
+        entry_condition->set_sensitive (a_mode != MODE_EVENT);
+
+        switch (a_mode) {
+            case MODE_SOURCE_LOCATION:
             LOG_DD ("Setting Sensitivity for SOURCE_LOCATION");
             break;
         case MODE_FUNCTION_NAME:
@@ -221,7 +229,6 @@
     void mode (SetBreakpointDialog::Mode a_mode)
     {
         LOG_FUNCTION_SCOPE_NORMAL_DD ;
-        NEMIVER_TRY
 
         THROW_IF_FAIL (radio_source_location) ;
         THROW_IF_FAIL (radio_function_name) ;
@@ -241,7 +248,7 @@
             radio_function_name->set_active ();
             entry_function->grab_focus () ;
             break;
-		    case MODE_EVENT:
+        case MODE_EVENT:
             LOG_DD ("Changing Mode to EVENT");
             radio_event->set_active ();
             combo_event->grab_focus ();
@@ -249,8 +256,6 @@
         default:
             THROW ("Should not be reached") ;
         }
-
-        NEMIVER_CATCH
     }
 
     UString get_active_event () const
@@ -259,21 +264,17 @@
         return (*iter)[combo_event_col_model.m_command];
     }
 
-    void set_active_event (const UString &v) const
+    void set_active_event (const UString &) const
     {
-        if (v.empty ()) {/*keep compiler happy*/}
         //TODO
     }
 
     SetBreakpointDialog::Mode mode () const
     {
-        NEMIVER_TRY
-
         THROW_IF_FAIL (radio_source_location) ;
         THROW_IF_FAIL (radio_function_name) ;
 
-        NEMIVER_CATCH
-            
+
         if (radio_source_location->get_active ()) {
             return MODE_SOURCE_LOCATION;
         } else if (radio_event->get_active ()) {
@@ -288,7 +289,7 @@
 SetBreakpointDialog::SetBreakpointDialog (const UString &a_root_path) :
     Dialog (a_root_path, "setbreakpointdialog.glade", "setbreakpointdialog")
 {
-    m_priv.reset (new Priv (glade ())) ;
+    m_priv.reset (new Priv (widget (), glade ()));
 }
 
 SetBreakpointDialog::~SetBreakpointDialog ()
@@ -298,103 +299,90 @@
 UString
 SetBreakpointDialog::file_name () const
 {
-    NEMIVER_TRY
-
     THROW_IF_FAIL (m_priv) ;
     THROW_IF_FAIL (m_priv->entry_filename) ;
 
-    NEMIVER_CATCH
     return m_priv->entry_filename->get_text () ;
 }
 
 void
 SetBreakpointDialog::file_name (const UString &a_name)
 {
-    NEMIVER_TRY
-
     THROW_IF_FAIL (m_priv) ;
     THROW_IF_FAIL (m_priv->entry_filename) ;
     m_priv->entry_filename->set_text (a_name) ;
-
-    NEMIVER_CATCH
 }
 
 int
 SetBreakpointDialog::line_number () const
 {
-    NEMIVER_TRY
-
     THROW_IF_FAIL (m_priv) ;
     THROW_IF_FAIL (m_priv->entry_line) ;
-
-    NEMIVER_CATCH
     return atoi (m_priv->entry_line->get_text ().c_str ()) ;
 }
 
 void
 SetBreakpointDialog::line_number (int a_line)
 {
-    NEMIVER_TRY
-
     THROW_IF_FAIL (m_priv) ;
     THROW_IF_FAIL (m_priv->entry_line) ;
     m_priv->entry_line->set_text (UString::from_int(a_line)) ;
-
-    NEMIVER_CATCH
 }
 
 UString
 SetBreakpointDialog::function () const
 {
-    NEMIVER_TRY
-
     THROW_IF_FAIL (m_priv) ;
     THROW_IF_FAIL (m_priv->entry_function) ;
 
-    NEMIVER_CATCH
     return m_priv->entry_function->get_text () ;
 }
 
 void
 SetBreakpointDialog::function (const UString &a_name)
 {
-    NEMIVER_TRY
-
     THROW_IF_FAIL (m_priv) ;
     THROW_IF_FAIL (m_priv->entry_function) ;
     m_priv->entry_function->set_text (a_name) ;
-
-    NEMIVER_CATCH
 }
 
 UString
 SetBreakpointDialog::event () const
 {
-    NEMIVER_TRY
     THROW_IF_FAIL (m_priv) ;
     THROW_IF_FAIL (m_priv->combo_event) ;
-    NEMIVER_CATCH
     return m_priv->get_active_event();
 }
 
 void SetBreakpointDialog::event (const UString &a_event) 
 {
-    NEMIVER_TRY
     THROW_IF_FAIL (m_priv) ;
     THROW_IF_FAIL (m_priv->combo_event) ;
     m_priv->set_active_event (a_event);
 
-    NEMIVER_CATCH
+}
+
+UString
+SetBreakpointDialog::condition () const
+{
+    THROW_IF_FAIL (m_priv);
+    THROW_IF_FAIL (m_priv->entry_condition);
+    return m_priv->entry_condition->get_text ();
+}
+
+void
+SetBreakpointDialog::condition (const UString &a_cond)
+{
+    THROW_IF_FAIL (m_priv);
+    THROW_IF_FAIL (m_priv->entry_condition);
+    m_priv->entry_condition->set_text (a_cond);
 }
 
 
 SetBreakpointDialog::Mode
 SetBreakpointDialog::mode () const
 {
-    NEMIVER_TRY
     THROW_IF_FAIL (m_priv) ;
-    NEMIVER_CATCH
-
     return m_priv->mode ();
 }
 
@@ -402,12 +390,8 @@
 void
 SetBreakpointDialog::mode (Mode a_mode)
 {
-    NEMIVER_TRY
-
     THROW_IF_FAIL (m_priv) ;
     m_priv->mode (a_mode);
-
-    NEMIVER_CATCH
 }
 
 }//end namespace nemiver

Modified: trunk/src/persp/dbgperspective/nmv-set-breakpoint-dialog.h
==============================================================================
--- trunk/src/persp/dbgperspective/nmv-set-breakpoint-dialog.h	(original)
+++ trunk/src/persp/dbgperspective/nmv-set-breakpoint-dialog.h	Sun Jun 22 20:07:28 2008
@@ -64,6 +64,9 @@
     UString event () const ;
     void event (const UString &a_event) ;
 
+    UString condition () const;
+    void condition (const UString &a_cond);
+
     Mode mode () const;
     void mode (Mode);
 

Modified: trunk/src/persp/dbgperspective/nmv-thread-list.cc
==============================================================================
--- trunk/src/persp/dbgperspective/nmv-thread-list.cc	(original)
+++ trunk/src/persp/dbgperspective/nmv-thread-list.cc	Sun Jun 22 20:07:28 2008
@@ -73,6 +73,7 @@
                                      bool a_has_frame,
                                      const IDebugger::Frame &a_frame,
                                      int a_thread_id,
+                                     int /*bp_num*/,
                                      const UString &a_cookie)
     {
         LOG_FUNCTION_SCOPE_NORMAL_DD ;

Modified: trunk/src/persp/dbgperspective/sqlscripts/sqlite/create-tables.sql
==============================================================================
--- trunk/src/persp/dbgperspective/sqlscripts/sqlite/create-tables.sql	(original)
+++ trunk/src/persp/dbgperspective/sqlscripts/sqlite/create-tables.sql	Sun Jun 22 20:07:28 2008
@@ -1,6 +1,6 @@
 create table schemainfo (version text not null) ;
 
-insert into schemainfo (version) values ('1.2') ;
+insert into schemainfo (version) values ('1.3') ;
 
 create table sessions (id integer primary key) ;
 
@@ -19,7 +19,8 @@
                           filename text,
                           filefullname text,
                           linenumber integer,
-                          enabled integer) ;
+                          enabled integer,
+                          condition text) ;
 
 create table openedfiles (id integer primary key,
                           sessionid integer,

Modified: trunk/tests/fooprog.cc
==============================================================================
--- trunk/tests/fooprog.cc	(original)
+++ trunk/tests/fooprog.cc	Sun Jun 22 20:07:28 2008
@@ -73,6 +73,17 @@
     a_param.do_this () ;
 }
 
+static int i,j;
+void
+func4 (Person &a_person)
+{
+    i=0;
+    for (j=0; j < 1000; ++j) {
+        i = j;
+        a_person.overload (i);
+    }
+}
+
 int
 main (int a_argc, char *a_argv[])
 {
@@ -90,6 +101,8 @@
 
     func3 (person) ;
 
+    func4 (person);
+
     return 0 ;
 }
 

Modified: trunk/tests/test-breakpoint.cc
==============================================================================
--- trunk/tests/test-breakpoint.cc	(original)
+++ trunk/tests/test-breakpoint.cc	Sun Jun 22 20:07:28 2008
@@ -26,8 +26,9 @@
 on_program_finished_signal ()
 {
     MESSAGE ("program finished") ;
-    BOOST_REQUIRE_MESSAGE (nb_bp == 3, "nb of breakpoint hits was: " << nb_bp) ;
-    BOOST_REQUIRE_MESSAGE (nb_stops > 3, "nb of stops was: " << nb_stops) ;
+    MESSAGE ("nb of breakpoint hit: " <<  (int)nb_bp);
+    BOOST_REQUIRE_MESSAGE (nb_bp == 5, "nb of breakpoint hits was: " << nb_bp) ;
+    BOOST_REQUIRE_MESSAGE (nb_stops > 5, "nb of stops was: " << nb_stops) ;
     loop->quit () ;
 }
 
@@ -69,18 +70,22 @@
               << "' of pid: '" << a_pid << "'") ;
 }
 
+//this breakpoint condition is good because it must be satisfied
+static const char *good_break_condition = "j == 900";
+//this breakpoint condition is good because it can't be satisfied
+static const char *bad_break_condition = "j == 1010";
+static bool cond_breakpoint_set = 0;
 void
 on_stopped_signal (IDebugger::StopReason a_reason,
                    bool a_has_frame,
                    const IDebugger::Frame &a_frame,
                    int a_thread_id,
-                   const UString &a_cookie,
+                   int a_bp_num,
+                   const UString &/*a_cookie*/,
                    IDebuggerSafePtr &a_debugger)
 {
     BOOST_REQUIRE (a_debugger) ;
 
-    if (a_cookie.empty ()) {}
-
     ++nb_stops ;
 
     MESSAGE ("stopped, reason is '" << a_reason << "'") ;
@@ -103,6 +108,32 @@
         } else if (a_frame.function_name () == "func2") {
             MESSAGE ("stepping from func2") ;
             a_debugger->step_over () ;
+        } else if (a_frame.function_name () == "func4") {
+            if (!cond_breakpoint_set) {
+                MESSAGE ("set conditional breakpoint with cond: "
+                         << good_break_condition
+                         << "; we expect this breakpoint to be hit");
+                a_debugger->set_breakpoint ("", 83, good_break_condition);
+                MESSAGE ("set conditional breakpoint with cond: "
+                         << bad_break_condition
+                         << "; this one should never be hit");
+                a_debugger->set_breakpoint ("", 83, bad_break_condition);
+                cond_breakpoint_set = true;
+            } else {
+                MESSAGE ("hit conditional breakpoint! bp number: "
+                         << a_bp_num);
+            }
+            map<int, IDebugger::BreakPoint>::const_iterator it;
+            map<int, IDebugger::BreakPoint>::const_iterator null_iter =
+                                    a_debugger->get_cached_breakpoints ().end ();
+
+            if ((it = a_debugger->get_cached_breakpoints ().find (a_bp_num))
+                 != null_iter
+                 && it->second.has_condition ()) {
+                MESSAGE ("hit conditional breakpoint. condition was: "
+                         << it->second.condition ());
+            }
+            a_debugger->do_continue ();
         } else {
             BOOST_FAIL ("Stopped, for an unknown reason") ;
         }
@@ -209,6 +240,7 @@
         debugger->set_breakpoint ("main") ;
         debugger->set_breakpoint ("func1") ;
         debugger->set_breakpoint ("func2") ;
+        debugger->set_breakpoint ("func4") ;
         debugger->run () ;
         loop->run () ;
     } catch (Glib::Exception &e) {

Modified: trunk/tests/test-core.cc
==============================================================================
--- trunk/tests/test-core.cc	(original)
+++ trunk/tests/test-core.cc	Sun Jun 22 20:07:28 2008
@@ -30,10 +30,9 @@
                    bool a_has_frame,
                    const IDebugger::Frame &a_frame,
                    int a_thread_id,
-                   const UString &a_cookie)
+                   int /*bp num*/,
+                   const UString &/*a_cookie*/)
 {
-    if (a_cookie.empty ()) {}
-
     std::cout << "stopped, reason: " << (int)a_reason << " " ;
     if (a_has_frame) {
         std::cout << "in frame: " << a_frame.function_name () ;
@@ -124,23 +123,18 @@
         debugger->program_finished_signal ().connect
             (sigc::ptr_fun (&on_program_finished_signal)) ;
 
-        debugger->stopped_signal ().connect
-            (sigc::ptr_fun (&on_stopped_signal)) ;
+        debugger->stopped_signal ().connect (&on_stopped_signal) ;
 
-        debugger->current_frame_signal ().connect
-            (sigc::ptr_fun (&on_current_frame_signal)) ;
+        debugger->current_frame_signal ().connect (&on_current_frame_signal) ;
 
-        debugger->frames_listed_signal ().connect
-            (sigc::ptr_fun (&on_frames_listed_signal)) ;
+        debugger->frames_listed_signal ().connect (&on_frames_listed_signal) ;
 
         debugger->frames_arguments_listed_signal ().connect
-            (sigc::ptr_fun (&on_frames_params_listed_signal)) ;
+            (&on_frames_params_listed_signal) ;
 
-        debugger->console_message_signal ().connect
-            (sigc::ptr_fun (&on_console_message_signal)) ;
+        debugger->console_message_signal ().connect (&on_console_message_signal);
 
-        debugger->log_message_signal ().connect
-            (sigc::ptr_fun (&on_error_message_signal)) ;
+        debugger->log_message_signal ().connect (&on_error_message_signal) ;
         //*********************************************
         //</connect to the events emited by the debugger>
         //*********************************************

Modified: trunk/tests/test-deref.cc
==============================================================================
--- trunk/tests/test-deref.cc	(original)
+++ trunk/tests/test-deref.cc	Sun Jun 22 20:07:28 2008
@@ -96,12 +96,11 @@
 on_stopped_signal (IDebugger::StopReason a_reason,
                    bool a_has_frame,
                    const IDebugger::Frame &a_frame,
-                   int a_thread_id,
-                   const UString &a_cookie,
+                   int /*a_thread_id*/,
+                   int /*bp num*/,
+                   const UString &/*a_cookie*/,
                    IDebuggerSafePtr &a_debugger)
 {
-    if (a_has_frame || a_frame.level () || a_thread_id || a_cookie.empty ()) {}
-
     BOOST_REQUIRE (a_debugger) ;
 
     if (a_reason == IDebugger::EXITED_NORMALLY) {
@@ -114,7 +113,7 @@
     }
     ++nb_stops;
 
-    if (a_frame.function_name () == "main" && nb_stops == 4) {
+    if (a_has_frame && a_frame.function_name () == "main" && nb_stops == 4) {
         a_debugger->print_variable_value ("foo_ptr") ;
         a_debugger->print_variable_value ("bar_ptr") ;
         a_debugger->print_variable_value ("baz_ptr") ;

Modified: trunk/tests/test-local-vars-list.cc
==============================================================================
--- trunk/tests/test-local-vars-list.cc	(original)
+++ trunk/tests/test-local-vars-list.cc	Sun Jun 22 20:07:28 2008
@@ -12,6 +12,7 @@
 
 Glib::RefPtr<Glib::MainLoop> loop =
     Glib::MainLoop::create (Glib::MainContext::get_default ()) ;
+IDebuggerSafePtr debugger;
 
 static int nb_stops=0 ;
 static int nb_var_type_set=0 ;
@@ -21,14 +22,11 @@
 on_stopped_signal (IDebugger::StopReason a_reason,
                    bool a_has_frame,
                    const IDebugger::Frame &a_frame,
-                   int a_thread_id,
-                   const UString &a_cookie,
-                   IDebuggerSafePtr &a_debugger,
-                   IVarListSafePtr &a_var_list)
+                   int /*a_thread_id*/,
+                   int /*a_bp_num*/,
+                   const UString &/*a_cookie*/,
+                   const IVarListSafePtr a_var_list)
 {
-    if (a_thread_id || a_cookie.empty ()) {}
-
-    BOOST_REQUIRE (a_debugger) ;
     BOOST_REQUIRE (a_var_list) ;
 
     MESSAGE ("stopped, reason: " << (int)a_reason) ;
@@ -67,13 +65,13 @@
         MESSAGE ("in main:" << (int)a_frame.line ());
         ++nb_stops ;
         if (nb_stops == 1) {
-            a_debugger->list_local_variables () ;
+            debugger->list_local_variables () ;
         } else if (nb_stops == 4) {
             a_var_list->update_state () ;
-            a_debugger->do_continue () ;
+            debugger->do_continue () ;
             return ;
         }
-        a_debugger->step_over () ;
+        debugger->step_over () ;
     }
 
 }
@@ -137,7 +135,7 @@
     Initializer::do_init () ;
 
     //load the IDebugger interface
-    IDebuggerSafePtr debugger =
+    debugger =
         DynamicModuleManager::load_iface_with_default_manager<IDebugger>
                                                                 ("gdbengine",
                                                                  "IDebugger") ;
@@ -153,8 +151,7 @@
 
     //set debugger slots
     debugger->stopped_signal ().connect (sigc::bind (&on_stopped_signal,
-                                                     debugger,
-                                                     var_list)) ;
+                                                     var_list));
     debugger->local_variables_listed_signal ().connect (sigc::bind
                             (&on_local_variables_listed_signal, var_list)) ;
 

Modified: trunk/tests/test-var-list.cc
==============================================================================
--- trunk/tests/test-var-list.cc	(original)
+++ trunk/tests/test-var-list.cc	Sun Jun 22 20:07:28 2008
@@ -45,17 +45,13 @@
 on_stopped_signal (IDebugger::StopReason a_reason,
                    bool a_has_frame,
                    const IDebugger::Frame &a_frame,
-                   int a_thread_id,
-                   const UString &a_cookie,
+                   int /*a_thread_id*/,
+                   int /*bp number*/,
+                   const UString &/*a_cookie*/,
                    IDebuggerSafePtr &a_debugger)
 {
     BOOST_REQUIRE (a_debugger) ;
 
-    if (a_has_frame || a_frame.level () || a_thread_id ||
-        a_cookie.empty () || a_debugger) {
-        /*keeps compiler happy*/
-    }
-
     if (a_reason == IDebugger::EXITED_NORMALLY) {
         MESSAGE ("program exited normally") ;
         s_loop->quit () ;

Modified: trunk/tests/test-var-walker.cc
==============================================================================
--- trunk/tests/test-var-walker.cc	(original)
+++ trunk/tests/test-var-walker.cc	Sun Jun 22 20:07:28 2008
@@ -91,17 +91,13 @@
 on_stopped_signal (IDebugger::StopReason a_reason,
                    bool a_has_frame,
                    const IDebugger::Frame &a_frame,
-                   int a_thread_id,
-                   const UString &a_cookie,
+                   int /*a_thread_id*/,
+                   int /*bp num*/,
+                   const UString &/*a_cookie*/,
                    IDebuggerSafePtr &a_debugger)
 {
     BOOST_REQUIRE (a_debugger) ;
 
-    if (a_has_frame || a_frame.level () || a_thread_id ||
-        a_cookie.empty () || a_debugger) {
-        /*keeps compiler happy*/
-    }
-
     if (a_reason == IDebugger::EXITED_NORMALLY) {
         MESSAGE ("program exited normally") ;
         s_loop->quit () ;



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