[nemiver] Arrange for VarInspectorDialog et al. to be initialized with IDebugger&



commit 82be5a393b06a3363fcfc3ea5709e0562e569c26
Author: Dodji Seketeli <dodji seketeli org>
Date:   Mon May 28 14:17:27 2012 +0200

    Arrange for VarInspectorDialog et al. to be initialized with IDebugger&
    
    	* src/dbgengine/nmv-i-var-list-walker.h
    	(IVarListWalker::initialize): Take a naked IDebugger pointer.
    	* src/dbgengine/nmv-var-list-walker.cc
    	(VarListWalker::initialize): Likewise.
    	(VarListWalker::m_debugger): Turn this into a naked pointer.
    	(VarListWalker::VarListWalker): Initialize the naked m_debugger
    	pointer.
    	* nmv-i-var-walker.h (IVarWalker::connect): Likewise.
    	(IVarWalker::get_debugger): Return a naked IDebugger pointer.
    	* src/dbgengine/nmv-var-walker.cc (VarWalker::m_debugger): Turn
    	this into a naked pointer.
    	(VarWalker::VarWalker): Initialize it.
    	(VarWalker::connect): Take a naked IDebugger pointer and adjust to
    	the change.
    	(VarWalker::get_debugger): Return a naked pointer.
    	* src/dbgengine/nmv-varobj-walker.cc (VarobjWalker::m_debugger):
    	Turn this into a naked pointer.
    	(VarobjWalker::VarobjWalker): Initialize it.
    	(VarobjWalker::connect): Take a naked IDebugger pointer.
    	* src/persp/dbgperspective/nmv-dbg-perspective.cc
    	(DBGPerspective::get_popup_var_inspector)
    	(DBGPerspective::set_watchpoint_using_dialog): Adjust use of
    	VarInspector constructor to using a reference to IDebugger,
    	instead of a safe ptr.
    	(GlobalVarsInspectorDialog::Priv::create_variable_walker_list):
    	Adjust call to IVarListWalker::initialize.
    	* src/persp/dbgperspective/nmv-local-vars-inspector.cc
    	(LocalVarsInspector::Priv::on_variable_value_copy_to_clipboard_action):
    	Likewise.
    	* src/persp/dbgperspective/nmv-var-inspector-dialog.h
    	(VarInspectorDialog::VarInspectorDialog): Remove redundant root
    	path parameter.
    	* src/persp/dbgperspective/nmv-var-inspector-dialog.cc
    	(VarInspectorDialog::Priv::debugger): Turn this into a reference
    	to IDebugger, instead of using a safe ptr.
    	(LocalVarsInspector::Priv::Priv): Update to pass IDebugger by
    	reference.
    	(VarInspectorDialog::VarInspectorDialog): Remove root path parm,
    	as it can be gotten from the perspective parameter.  Adjust Dialog
    	initializer.
    	* src/persp/dbgperspective/nmv-var-inspector.h
    	(VarInspector::VarInspector): Take a reference to IDebugger,
    	instead of the safe ptr.
    	* src/persp/dbgperspective/nmv-var-inspector.cc
    	(VarInspector::Priv::debugger):  Turn this into a reference,
    	instead of using a safe ptr.
    	(VarInspector::Priv::set_variable)
    	(VarInspector::Priv::create_variable)
    	(VarInspector::Priv::on_tree_view_selection_changed_signal)
    	(VarInspector::Priv::on_tree_view_row_expanded_signal)
    	(VarInspector::Priv::on_cell_edited_signal)
    	(VarInspector::Priv::on_variable_value_copy_to_clipboard_action):
    	Adjust use of debugger.
    	* src/persp/dbgperspective/nmv-watchpoint-dialog.cc
    	(WatchpointDialog::Priv::debugger): Turn this into a reference on
    	IDebugger, instead of a safe ptr.
    	(WatchpointDialog::Priv::Priv)
    	(WatchpointDialog::WatchpointDialog): Adjust.
    	* src/persp/dbgperspective/nmv-dbg-perspective.cc
    	(DBGPerspective::inspect_variable): Adjust use of
    	VarInspectorDialog.
    	* src/common/nmv-plugin.h (Plugin::plugin_path): Make this public.
    	* tests/test-var-walker.cc (create_var_list_walker):  Adjust.
    	* tests/test-varobj-walker.cc: Likewise.

 src/common/nmv-plugin.h                            |    5 ++-
 src/dbgengine/nmv-i-var-list-walker.h              |    2 +-
 src/dbgengine/nmv-i-var-walker.h                   |    6 ++--
 src/dbgengine/nmv-var-list-walker.cc               |    9 +++--
 src/dbgengine/nmv-var-walker.cc                    |   29 ++++++++++++-------
 src/dbgengine/nmv-varobj-walker.cc                 |   15 +++++----
 src/persp/dbgperspective/nmv-dbg-perspective.cc    |    7 ++--
 .../nmv-global-vars-inspector-dialog.cc            |    2 +-
 .../dbgperspective/nmv-local-vars-inspector.cc     |    2 +-
 .../dbgperspective/nmv-var-inspector-dialog.cc     |    9 ++---
 .../dbgperspective/nmv-var-inspector-dialog.h      |    3 +-
 src/persp/dbgperspective/nmv-var-inspector.cc      |   30 ++++++++++----------
 src/persp/dbgperspective/nmv-var-inspector.h       |    4 +-
 src/persp/dbgperspective/nmv-watchpoint-dialog.cc  |    6 ++--
 src/persp/dbgperspective/nmv-watchpoint-dialog.h   |    2 +-
 tests/test-var-walker.cc                           |    2 +-
 tests/test-varobj-walker.cc                        |    2 +-
 17 files changed, 71 insertions(+), 64 deletions(-)
---
diff --git a/src/common/nmv-plugin.h b/src/common/nmv-plugin.h
index 5f148c7..9f67ddc 100644
--- a/src/common/nmv-plugin.h
+++ b/src/common/nmv-plugin.h
@@ -169,12 +169,11 @@ public:
         //must be created by a factory
         EntryPoint (DynamicModuleSafePtr &a_module);
         EntryPoint (DynamicModule *a_module);
+
         virtual void activate (bool a_activate,
                                ObjectSafePtr &a_activation_context);
         virtual bool is_activated ();
 
-        const UString& plugin_path ();
-
         void descriptor (DescriptorSafePtr &a_desc);
 
     public:
@@ -182,6 +181,8 @@ public:
         bool build_absolute_resource_path (const UString &a_relative_path,
                                            std::string &a_absolute_path);
 
+        const UString& plugin_path ();
+
         class NEMIVER_API Loader : public DynamicModule::Loader {
             struct Priv;
             SafePtr<Priv> m_priv;
diff --git a/src/dbgengine/nmv-i-var-list-walker.h b/src/dbgengine/nmv-i-var-list-walker.h
index dde7d6b..b719c0d 100644
--- a/src/dbgengine/nmv-i-var-list-walker.h
+++ b/src/dbgengine/nmv-i-var-list-walker.h
@@ -59,7 +59,7 @@ public:
     virtual sigc::signal<void>& variable_list_visited_signal () const=0;
     ///@}
 
-    virtual void initialize (IDebuggerSafePtr &a_debugger)=0;
+    virtual void initialize (IDebugger *a_debugger)=0;
 
     virtual void append_variable (const IDebugger::VariableSafePtr a_var)=0;
 
diff --git a/src/dbgengine/nmv-i-var-walker.h b/src/dbgengine/nmv-i-var-walker.h
index 8575659..6f031b2 100644
--- a/src/dbgengine/nmv-i-var-walker.h
+++ b/src/dbgengine/nmv-i-var-walker.h
@@ -72,10 +72,10 @@ public:
 
     /// connect the walker to a variable and to a debugger
     /// that will be use to walk that variable
-    virtual void connect (IDebuggerSafePtr a_debugger,
+    virtual void connect (IDebugger *a_debugger,
                           const UString &a_var_name) = 0;
 
-    virtual void connect (IDebuggerSafePtr a_debugger,
+    virtual void connect (IDebugger *a_debugger,
                           const IDebugger::VariableSafePtr a_var) = 0;
 
     virtual void do_walk_variable (const UString &a_cookie = "") = 0;
@@ -86,7 +86,7 @@ public:
     virtual const IDebugger::VariableSafePtr get_variable () const = 0;
 
     /// gets the debugger the walker is connected to
-    virtual IDebuggerSafePtr get_debugger () const = 0;
+    virtual IDebugger* get_debugger () const = 0;
 
     /// accessor of the maximum depth of variable members to explore.
     /// this can prevent inifite recursions.
diff --git a/src/dbgengine/nmv-var-list-walker.cc b/src/dbgengine/nmv-var-list-walker.cc
index 155f3d7..bd63559 100644
--- a/src/dbgengine/nmv-var-list-walker.cc
+++ b/src/dbgengine/nmv-var-list-walker.cc
@@ -45,7 +45,7 @@ class VarListWalker : public IVarListWalker {
      typedef std::deque<WalkersMap> WalkersQueue;
      WalkersQueue m_considered_walkers;
      WalkersMap m_walkers_map;
-     IDebuggerSafePtr m_debugger;
+     IDebugger *m_debugger;
 
      IVarWalkerSafePtr create_variable_walker
                                  (const IDebugger::VariableSafePtr &a_var);
@@ -56,7 +56,8 @@ class VarListWalker : public IVarListWalker {
 public:
 
      VarListWalker (DynamicModule *a_dynmod) :
-         IVarListWalker (a_dynmod)
+         IVarListWalker (a_dynmod),
+         m_debugger (0)
     {
     }
     //******************
@@ -68,7 +69,7 @@ public:
     //******************
     //</event getters>
     //******************
-    void initialize (IDebuggerSafePtr &a_debugger);
+    void initialize (IDebugger *a_debugger);
 
     void append_variable (const IDebugger::VariableSafePtr a_var);
 
@@ -130,7 +131,7 @@ VarListWalker::variable_list_visited_signal () const
 }
 
 void
-VarListWalker::initialize (IDebuggerSafePtr &a_debugger)
+VarListWalker::initialize (IDebugger *a_debugger)
 {
     THROW_IF_FAIL (a_debugger);
 
diff --git a/src/dbgengine/nmv-var-walker.cc b/src/dbgengine/nmv-var-walker.cc
index ed406e3..2059b88 100644
--- a/src/dbgengine/nmv-var-walker.cc
+++ b/src/dbgengine/nmv-var-walker.cc
@@ -67,7 +67,7 @@ class VarWalker : public IVarWalker , public sigc::trackable {
                          const IDebugger::VariableSafePtr>
                                             m_visited_variable_signal;
 
-    mutable GDBEngineSafePtr m_debugger;
+    mutable GDBEngine *m_debugger;
     UString m_root_var_name;
     list<sigc::connection> m_connections;
     map<IDebugger::VariableSafePtr, bool, SafePtrCmp> m_vars_to_visit;
@@ -89,7 +89,8 @@ class VarWalker : public IVarWalker , public sigc::trackable {
 public:
 
     VarWalker (DynamicModule *a_dynmod) :
-        IVarWalker (a_dynmod)
+        IVarWalker (a_dynmod),
+        m_debugger (0)
     {
     }
 
@@ -104,16 +105,16 @@ public:
     //</event getters>
     //********************
 
-    void connect (IDebuggerSafePtr a_debugger, const UString &a_var_name);
+    void connect (IDebugger *a_debugger, const UString &a_var_name);
 
-    void connect (IDebuggerSafePtr a_debugger,
+    void connect (IDebugger *a_debugger,
                   const IDebugger::VariableSafePtr a_var);
 
     void do_walk_variable (const UString &a_cookie="");
 
     const IDebugger::VariableSafePtr get_variable () const;
 
-    IDebuggerSafePtr get_debugger () const;
+    IDebugger *get_debugger () const;
 
     void set_maximum_member_depth (unsigned a_max_depth);
 
@@ -253,11 +254,14 @@ VarWalker::visited_variable_signal () const
 }
 
 void
-VarWalker::connect (IDebuggerSafePtr a_debugger,
+VarWalker::connect (IDebugger *a_debugger,
                     const UString &a_var_name)
 {
-    m_debugger = a_debugger.do_dynamic_cast<GDBEngine> ();
+    THROW_IF_FAIL (a_debugger);
+
+    m_debugger = dynamic_cast<GDBEngine*> (a_debugger);
     THROW_IF_FAIL (m_debugger);
+
     m_root_var_name = a_var_name;
 
     list<sigc::connection>::iterator it;
@@ -271,11 +275,14 @@ VarWalker::connect (IDebuggerSafePtr a_debugger,
 }
 
 void
-VarWalker::connect (IDebuggerSafePtr a_debugger,
+VarWalker::connect (IDebugger *a_debugger,
                     const IDebugger::VariableSafePtr a_var)
 {
-    m_debugger = a_debugger.do_dynamic_cast<GDBEngine> ();
+    THROW_IF_FAIL (a_debugger);
+
+    m_debugger = dynamic_cast<GDBEngine *> (a_debugger);
     THROW_IF_FAIL (m_debugger);
+
     m_root_var = a_var;
 
     list<sigc::connection>::iterator it;
@@ -316,10 +323,10 @@ VarWalker::get_variable () const
     return m_root_var;
 }
 
-IDebuggerSafePtr
+IDebugger*
 VarWalker::get_debugger () const
 {
-    return m_debugger.do_dynamic_cast<IDebugger> ();
+    return dynamic_cast<IDebugger*> (m_debugger);
 }
 
 void
diff --git a/src/dbgengine/nmv-varobj-walker.cc b/src/dbgengine/nmv-varobj-walker.cc
index 9fab8f1..408c0b1 100644
--- a/src/dbgengine/nmv-varobj-walker.cc
+++ b/src/dbgengine/nmv-varobj-walker.cc
@@ -52,7 +52,7 @@ class VarobjWalker : public IVarWalker, public sigc::trackable
     mutable sigc::signal<void,
                          const IDebugger::VariableSafePtr>
                                         m_visited_variable_signal;
-    IDebuggerSafePtr m_debugger;
+    IDebugger *m_debugger;
     IDebugger::VariableSafePtr m_variable;
     UString m_var_name;
     bool m_do_walk;
@@ -67,6 +67,7 @@ public:
 
     VarobjWalker (DynamicModule *a_dynmod) :
         IVarWalker (a_dynmod),
+        m_debugger (0),
         m_do_walk (false),
         m_variable_unfolds (0),
         m_max_depth (MAX_DEPTH)
@@ -80,17 +81,17 @@ public:
                  const IDebugger::VariableSafePtr>
                                     visited_variable_signal () const;
 
-    void connect (IDebuggerSafePtr a_debugger,
+    void connect (IDebugger *a_debugger,
                   const UString &a_var_name);
 
-    void connect (IDebuggerSafePtr a_debugger,
+    void connect (IDebugger *a_debugger,
                   const IDebugger::VariableSafePtr a_var);
 
     void do_walk_variable (const UString &a_cookie="");
 
     const IDebugger::VariableSafePtr get_variable () const;
 
-    IDebuggerSafePtr get_debugger () const;
+    IDebugger* get_debugger () const;
 
     void set_maximum_member_depth (unsigned a_max_depth);
 
@@ -120,7 +121,7 @@ VarobjWalker::visited_variable_signal () const
 }
 
 void
-VarobjWalker::connect (IDebuggerSafePtr a_debugger,
+VarobjWalker::connect (IDebugger *a_debugger,
                        const UString &a_var_name)
 {
     LOG_FUNCTION_SCOPE_NORMAL_DD;
@@ -137,7 +138,7 @@ VarobjWalker::connect (IDebuggerSafePtr a_debugger,
 }
 
 void
-VarobjWalker::connect (IDebuggerSafePtr a_debugger,
+VarobjWalker::connect (IDebugger *a_debugger,
                        const IDebugger::VariableSafePtr a_var)
 {
     LOG_FUNCTION_SCOPE_NORMAL_DD;
@@ -177,7 +178,7 @@ VarobjWalker::get_variable () const
     return m_variable;
 }
 
-IDebuggerSafePtr
+IDebugger*
 VarobjWalker::get_debugger () const
 {
     LOG_FUNCTION_SCOPE_NORMAL_DD;
diff --git a/src/persp/dbgperspective/nmv-dbg-perspective.cc b/src/persp/dbgperspective/nmv-dbg-perspective.cc
index db41e32..7c905af 100644
--- a/src/persp/dbgperspective/nmv-dbg-perspective.cc
+++ b/src/persp/dbgperspective/nmv-dbg-perspective.cc
@@ -4825,7 +4825,7 @@ DBGPerspective::get_popup_var_inspector ()
 
     if (!m_priv->popup_var_inspector)
         m_priv->popup_var_inspector.reset
-                    (new VarInspector (debugger (),
+                    (new VarInspector (*debugger (),
                                        *const_cast<DBGPerspective*> (this)));
     THROW_IF_FAIL (m_priv->popup_var_inspector);
     return *m_priv->popup_var_inspector;
@@ -7584,7 +7584,7 @@ DBGPerspective::set_watchpoint_using_dialog ()
 {
     LOG_FUNCTION_SCOPE_NORMAL_DD;
 
-    WatchpointDialog dialog (plugin_path (), debugger (), *this);
+    WatchpointDialog dialog (plugin_path (), *debugger (), *this);
     int result = dialog.run ();
     if (result != Gtk::RESPONSE_OK) {
         return;
@@ -7841,8 +7841,7 @@ void
 DBGPerspective::inspect_variable (const UString &a_variable_name)
 {
     THROW_IF_FAIL (debugger ());
-    VarInspectorDialog dialog (plugin_path (),
-                               debugger (),
+    VarInspectorDialog dialog (*debugger (),
                                *this);
     dialog.set_history (m_priv->var_inspector_dialog_history);
     if (a_variable_name != "") {
diff --git a/src/persp/dbgperspective/nmv-global-vars-inspector-dialog.cc b/src/persp/dbgperspective/nmv-global-vars-inspector-dialog.cc
index e321521..9e80e2a 100644
--- a/src/persp/dbgperspective/nmv-global-vars-inspector-dialog.cc
+++ b/src/persp/dbgperspective/nmv-global-vars-inspector-dialog.cc
@@ -140,7 +140,7 @@ public:
             module_manager->load_iface<IVarListWalker> ("varlistwalker",
                                                         "IVarListWalker");
         THROW_IF_FAIL (result);
-        result->initialize (debugger);
+        result->initialize (debugger.get ());
         return result;
     }
 
diff --git a/src/persp/dbgperspective/nmv-local-vars-inspector.cc b/src/persp/dbgperspective/nmv-local-vars-inspector.cc
index 2323774..2a995df 100644
--- a/src/persp/dbgperspective/nmv-local-vars-inspector.cc
+++ b/src/persp/dbgperspective/nmv-local-vars-inspector.cc
@@ -1172,7 +1172,7 @@ public:
         THROW_IF_FAIL (variable);
 
         IVarWalkerSafePtr walker = get_varobj_walker ();
-        walker->connect (debugger, variable);
+        walker->connect (debugger.get (), variable);
         walker->do_walk_variable ();
 
         NEMIVER_CATCH
diff --git a/src/persp/dbgperspective/nmv-var-inspector-dialog.cc b/src/persp/dbgperspective/nmv-var-inspector-dialog.cc
index fd870aa..1c5f0e7 100644
--- a/src/persp/dbgperspective/nmv-var-inspector-dialog.cc
+++ b/src/persp/dbgperspective/nmv-var-inspector-dialog.cc
@@ -54,7 +54,7 @@ class VarInspectorDialog::Priv {
     SafePtr<VarInspector> var_inspector;
     Gtk::Dialog &dialog;
     Glib::RefPtr<Gtk::Builder> gtkbuilder;
-    IDebuggerSafePtr debugger;
+    IDebugger &debugger;
     IPerspective &perspective;
 
     Priv ();
@@ -62,7 +62,7 @@ public:
 
     Priv (Gtk::Dialog &a_dialog,
           const Glib::RefPtr<Gtk::Builder> &a_gtkbuilder,
-          IDebuggerSafePtr a_debugger,
+          IDebugger &a_debugger,
           IPerspective &a_perspective) :
         var_name_entry (0),
         inspect_button (0),
@@ -342,10 +342,9 @@ public:
     //*************************
 };//end class VarInspectorDialog::Priv
 
-VarInspectorDialog::VarInspectorDialog (const UString &a_root_path,
-                                        IDebuggerSafePtr &a_debugger,
+VarInspectorDialog::VarInspectorDialog (IDebugger &a_debugger,
                                         IPerspective &a_perspective) :
-    Dialog (a_root_path,
+    Dialog (a_perspective.plugin_path (),
             "varinspectordialog.ui",
             "varinspectordialog")
 {
diff --git a/src/persp/dbgperspective/nmv-var-inspector-dialog.h b/src/persp/dbgperspective/nmv-var-inspector-dialog.h
index ce4998b..f397423 100644
--- a/src/persp/dbgperspective/nmv-var-inspector-dialog.h
+++ b/src/persp/dbgperspective/nmv-var-inspector-dialog.h
@@ -44,8 +44,7 @@ class VarInspectorDialog : public Dialog {
     SafePtr<Priv> m_priv;
 
 public:
-    VarInspectorDialog (const UString &a_resource_root_path,
-                        IDebuggerSafePtr &a_debugger,
+    VarInspectorDialog (IDebugger &a_debugger,
                         IPerspective &a_perspective);
     virtual ~VarInspectorDialog ();
 
diff --git a/src/persp/dbgperspective/nmv-var-inspector.cc b/src/persp/dbgperspective/nmv-var-inspector.cc
index 256ea98..4e5e740 100644
--- a/src/persp/dbgperspective/nmv-var-inspector.cc
+++ b/src/persp/dbgperspective/nmv-var-inspector.cc
@@ -60,7 +60,7 @@ class VarInspector::Priv : public sigc::trackable {
     bool expand_variable;
     bool re_visualize;
     bool enable_contextual_menu;
-    IDebuggerSafePtr debugger;
+    IDebugger &debugger;
     // Variable that is being inspected
     // at a given point in time
     IDebugger::VariableSafePtr variable;
@@ -209,12 +209,12 @@ class VarInspector::Priv : public sigc::trackable {
         re_init_tree_view ();
         variable = a_variable;
         if (a_re_visualize) {
-            debugger->revisualize_variable (a_variable,
-                                            sigc::bind
-                                            (sigc::mem_fun
-                                             (*this,
-                                              &Priv::on_var_revisualized),
-                                             a_expand));
+            debugger.revisualize_variable (a_variable,
+                                           sigc::bind
+                                           (sigc::mem_fun
+                                            (*this,
+                                             &Priv::on_var_revisualized),
+                                            a_expand));
         } else {
             graphically_set_variable (a_variable, a_expand);
         }
@@ -276,7 +276,7 @@ class VarInspector::Priv : public sigc::trackable {
         LOG_FUNCTION_SCOPE_NORMAL_DD;
 
         expand_variable = a_expand;
-        debugger->create_variable
+        debugger.create_variable
             (a_name,
              sigc::bind
              (sigc::mem_fun
@@ -432,7 +432,7 @@ class VarInspector::Priv : public sigc::trackable {
         // editable.
         cur_selected_row->set_value
                     (vutil::get_variable_columns ().variable_value_editable,
-                     debugger->is_variable_editable (variable));
+                     debugger.is_variable_editable (variable));
 
         // Dump some log about the variable that got selected.
         UString qname;
@@ -479,7 +479,7 @@ class VarInspector::Priv : public sigc::trackable {
 
         IDebugger::VariableSafePtr var =
             (*a_row_it)[vutil::get_variable_columns ().variable];
-        debugger->unfold_variable
+        debugger.unfold_variable
         (var, sigc::bind (sigc::mem_fun (*this,
                                          &Priv::on_variable_unfolded_signal),
                           a_row_path));
@@ -501,7 +501,7 @@ class VarInspector::Priv : public sigc::trackable {
             (*row)[vutil::get_variable_columns ().variable];
         THROW_IF_FAIL (var);
 
-        debugger->assign_variable
+        debugger.assign_variable
             (var, a_text,
              sigc::bind (sigc::mem_fun
                                  (*this, &Priv::on_variable_assigned_signal),
@@ -602,7 +602,7 @@ class VarInspector::Priv : public sigc::trackable {
                 (vutil::get_variable_columns ().variable);
         THROW_IF_FAIL (variable);
 
-        debugger->query_variable_path_expr
+        debugger.query_variable_path_expr
             (variable,
              sigc::mem_fun (*this, &Priv::on_variable_path_expression_signal));
 
@@ -623,7 +623,7 @@ class VarInspector::Priv : public sigc::trackable {
         THROW_IF_FAIL (variable);
 
         IVarWalkerSafePtr walker = get_varobj_walker ();
-        walker->connect (debugger, variable);
+        walker->connect (&debugger, variable);
         walker->do_walk_variable ();
 
         NEMIVER_CATCH
@@ -644,7 +644,7 @@ class VarInspector::Priv : public sigc::trackable {
 
 public:
 
-    Priv (IDebuggerSafePtr a_debugger,
+    Priv (IDebugger &a_debugger,
           IPerspective &a_perspective) :
           requested_variable (false),
           requested_type (false),
@@ -667,7 +667,7 @@ public:
     }
 };//end class VarInspector::Priv
 
-VarInspector::VarInspector (IDebuggerSafePtr a_debugger,
+VarInspector::VarInspector (IDebugger &a_debugger,
                             IPerspective &a_perspective)
 {
     m_priv.reset (new Priv (a_debugger, a_perspective));
diff --git a/src/persp/dbgperspective/nmv-var-inspector.h b/src/persp/dbgperspective/nmv-var-inspector.h
index 1414c71..e194619 100644
--- a/src/persp/dbgperspective/nmv-var-inspector.h
+++ b/src/persp/dbgperspective/nmv-var-inspector.h
@@ -48,8 +48,8 @@ class VarInspector : public nemiver::common::Object {
     SafePtr<Priv> m_priv;
 
 public:
-    VarInspector (IDebuggerSafePtr a_debugger,
-                   IPerspective &a_perspective);
+    VarInspector (IDebugger &a_debugger,
+		  IPerspective &a_perspective);
     virtual ~VarInspector ();
     Gtk::Widget& widget () const;
     void set_variable (IDebugger::VariableSafePtr a_variable,
diff --git a/src/persp/dbgperspective/nmv-watchpoint-dialog.cc b/src/persp/dbgperspective/nmv-watchpoint-dialog.cc
index 5c65b33..de2b27d 100644
--- a/src/persp/dbgperspective/nmv-watchpoint-dialog.cc
+++ b/src/persp/dbgperspective/nmv-watchpoint-dialog.cc
@@ -44,12 +44,12 @@ struct WatchpointDialog::Priv {
     Gtk::Button *ok_button;
     Gtk::Button *cancel_button;
     SafePtr<VarInspector> var_inspector;
-    IDebuggerSafePtr debugger;
+    IDebugger &debugger;
     IPerspective &perspective;
 
     Priv (Gtk::Dialog &a_dialog,
           const Glib::RefPtr<Gtk::Builder> &a_gtkbuilder,
-          IDebuggerSafePtr a_debugger,
+          IDebugger &a_debugger,
           IPerspective &a_perspective) :
         dialog (a_dialog),
         gtkbuilder (a_gtkbuilder),
@@ -198,7 +198,7 @@ struct WatchpointDialog::Priv {
 }; // end struct WatchpointDialog
 
 WatchpointDialog::WatchpointDialog (const UString &a_root_path,
-                                    IDebuggerSafePtr a_debugger,
+                                    IDebugger &a_debugger,
                                     IPerspective &a_perspective) :
     Dialog (a_root_path,
             "watchpointdialog.ui",
diff --git a/src/persp/dbgperspective/nmv-watchpoint-dialog.h b/src/persp/dbgperspective/nmv-watchpoint-dialog.h
index d6915a5..e3039a5 100644
--- a/src/persp/dbgperspective/nmv-watchpoint-dialog.h
+++ b/src/persp/dbgperspective/nmv-watchpoint-dialog.h
@@ -60,7 +60,7 @@ public:
     };
 
     WatchpointDialog (const UString &a_resource_root_path,
-                      IDebuggerSafePtr a_debugger,
+                      IDebugger &a_debugger,
                       IPerspective &a_perspective);
     virtual ~WatchpointDialog ();
 
diff --git a/tests/test-var-walker.cc b/tests/test-var-walker.cc
index 768f3c8..bdc18ca 100644
--- a/tests/test-var-walker.cc
+++ b/tests/test-var-walker.cc
@@ -61,7 +61,7 @@ create_var_list_walker (IDebuggerSafePtr a_debugger)
         DynamicModuleManager::load_iface_with_default_manager<IVarListWalker>
                                                                 ("varlistwalker",
                                                                  "IVarListWalker");
-    result->initialize (a_debugger);
+    result->initialize (a_debugger.get ());
     result->variable_visited_signal ().connect
         (sigc::bind (&on_variable_visited_signal, a_debugger));
     result->variable_list_visited_signal ().connect
diff --git a/tests/test-varobj-walker.cc b/tests/test-varobj-walker.cc
index 85f9ab0..bdc1a8d 100644
--- a/tests/test-varobj-walker.cc
+++ b/tests/test-varobj-walker.cc
@@ -113,7 +113,7 @@ do_varobj_walker_stuff (IDebuggerSafePtr a_debugger)
     IVarWalkerSafePtr var_walker = get_varobj_walker ();
 
     var_walker->visited_variable_signal ().connect (&on_variable_visited_signal);
-    var_walker->connect (a_debugger, "person");
+    var_walker->connect (a_debugger.get (), "person");
     var_walker->do_walk_variable ();
 }
 



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