]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
add the --ddd-session option
authoradam <adam>
Tue, 28 Jul 2009 14:34:56 +0000 (14:34 +0000)
committeradam <adam>
Tue, 28 Jul 2009 14:34:56 +0000 (14:34 +0000)
bin/launchConfigureParser.py
bin/runSalome.py

index 87630757e733c92f460f1922530f6275e530e197..1506c21e17351dae6d46436a57a18aa610c2812e 100755 (executable)
@@ -56,6 +56,7 @@ batch_nam      = "batch"
 test_nam       = "test"
 play_nam       = "play"
 gdb_session_nam = "gdb_session"
+ddd_session_nam = "ddd_session"
 
 # values in XML configuration file giving specific module parameters (<module_name> section)
 # which are stored in opts with key <module_name>_<parameter> (eg SMESH_plugins)
@@ -625,6 +626,13 @@ def CreateOptionParser (theAdditionalOptions=[]):
                             dest="gdb_session", default=False,
                             help=help_str)
     
+    # ddd session
+    help_str = "Launch session with ddd"
+    o_ddd = optparse.Option("--ddd-session",
+                            action="store_true",
+                            dest="ddd_session", default=False,
+                            help=help_str)
+    
     # All options
     opt_list = [o_t,o_g, # GUI/Terminal
                 o_d,o_o, # Desktop
@@ -647,7 +655,9 @@ def CreateOptionParser (theAdditionalOptions=[]):
                 o_nspl,
                 o_test,  # Write/read test script file with help of TestRecorder
                 o_play,  # Reproducing test script with help of TestRecorder
-                o_gdb]
+                o_gdb,
+                o_ddd,
+                ]
 
     #std_options = ["gui", "desktop", "log_file", "py_scripts", "resources",
     #               "xterm", "modules", "embedded", "standalone",
@@ -931,6 +941,10 @@ def get_env(theAdditionalOptions=[], appname="SalomeApp"):
     if cmd_opts.gdb_session is not None:
         args[gdb_session_nam] = cmd_opts.gdb_session
 
+    # Ddd session in xterm
+    if cmd_opts.ddd_session is not None:
+        args[ddd_session_nam] = cmd_opts.ddd_session
+
     ####################################################
     # Add <theAdditionalOptions> values to args
     for add_opt in theAdditionalOptions:
index f5b95927f250134fbc056d59b2bc2318c0450518..fd4be41e1aebde74e19778c62e7b6b32422bff3e 100755 (executable)
@@ -320,7 +320,7 @@ class SessionServer(Server):
         elif self.args.has_key('play'):
             self.CMD+=['-play'] + self.args['play']
 
-        if self.args["gdb_session"]:
+        if self.args["gdb_session"] or self.args["ddd_session"]:
             f = open(".gdbinit4salome", "w")
             f.write("set args ")
             args = " ".join(self.CMD[1:])
@@ -329,7 +329,11 @@ class SessionServer(Server):
             f.write(args)
             f.write("\n")
             f.close()
-            self.CMD = ["xterm", "-e", "gdb", "--command=.gdbinit4salome", self.CMD[0]]
+            if self.args["ddd_session"]:
+                self.CMD = ["ddd", "--command=.gdbinit4salome", self.CMD[0]]
+            elif self.args["gdb_session"]:
+                self.CMD = ["xterm", "-e", "gdb", "--command=.gdbinit4salome", self.CMD[0]]
+                pass
             pass
         
 # ---