[Xfce4-commits] <midori:master> Lookup full gdb path and print error if not found

Christian Dywan noreply at xfce.org
Tue Feb 26 01:16:01 CET 2013


Updating branch refs/heads/master
         to 435887d83f4e23f4ae1baaa1289902b2806edc9e (commit)
       from 21d24359263b80d7db742410c71becd3891b7e96 (commit)

commit 435887d83f4e23f4ae1baaa1289902b2806edc9e
Author: Christian Dywan <christian at twotoasts.de>
Date:   Tue Feb 26 01:14:58 2013 +0100

    Lookup full gdb path and print error if not found

 midori/main.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/midori/main.c b/midori/main.c
index 4656378..7e8a0eb 100644
--- a/midori/main.c
+++ b/midori/main.c
@@ -142,13 +142,18 @@ main (int    argc,
 
     if (debug)
     {
+        gchar* gdb = g_find_program_in_path ("gdb");
         gchar* args = midori_paths_get_command_line_str (FALSE);
         gchar* cmd = g_strdup_printf (
             "--batch -ex 'set print thread-events off' -ex run "
             "-ex bt -ex 'set logging on %s' --return-child-result "
             "--args %s",
             "/tmp/midori-gdb.bt", args);
-        sokoke_spawn_program ("gdb", TRUE, cmd, FALSE, TRUE);
+        if (gdb != NULL)
+            sokoke_spawn_program (gdb, TRUE, cmd, FALSE, TRUE);
+        else
+            g_print (_("Error: \"gdb\" can't be found\n"));
+        g_free (gdb);
         g_free (cmd);
         g_free (args);
         return 0;


More information about the Xfce4-commits mailing list