]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Followup to r7192: don't bork the compilation if GDB_PATH is not
authorJulian Seward <jseward@acm.org>
Tue, 20 Nov 2007 21:38:14 +0000 (21:38 +0000)
committerJulian Seward <jseward@acm.org>
Tue, 20 Nov 2007 21:38:14 +0000 (21:38 +0000)
defined (in config.h)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7194

coregrind/m_main.c

index 84d0953313b45982d0e524a56ec7fa8795a4e58f..a7adbe8933e63681ee8b8e07b1617548ea3fa29e 100644 (file)
@@ -209,12 +209,18 @@ static void usage_NORETURN ( Bool debug_help )
 "  tool's start-up message for more information.\n"
 "\n";
 
+#  if defined(GDB_PATH)
+   Char* gdb_path = GDB_PATH;
+#  else
+   Char* gdb_path = "/no/gdb/was/found/at/configure/time";
+#  endif
+
    // Ensure the message goes to stdout
    VG_(clo_log_fd) = 1;
    vg_assert( !VG_(logging_to_socket) );
 
    /* 'usage1' expects one char* argument */
-   VG_(printf)(usage1, GDB_PATH);
+   VG_(printf)(usage1, gdb_path);
    if (VG_(details).name) {
       VG_(printf)("  user options for %s:\n", VG_(details).name);
       if (VG_(needs).command_line_options)