gold/
[deliverable/binutils-gdb.git] / gdb / linux-thread-db.c
index e3d893a99724766b6efafbc698461251ef8d2b76..23c29c9dd1d2d274f26fe4f0828f4358fe055210 100644 (file)
@@ -42,6 +42,7 @@
 #include "linux-procfs.h"
 #include "linux-osdata.h"
 #include "auto-load.h"
+#include "cli/cli-utils.h"
 
 #include <signal.h>
 #include <ctype.h>
@@ -1028,17 +1029,17 @@ thread_db_load_search (void)
              || this_dir[pdir_len] == '/'))
        {
          char *subdir = NULL;
-         struct cleanup *free_subdir_cleanup = NULL;
+         struct cleanup *free_subdir_cleanup
+           = make_cleanup (null_cleanup, NULL);
 
          if (this_dir[pdir_len] == '/')
            {
              subdir = xmalloc (strlen (this_dir));
-             free_subdir_cleanup = make_cleanup (xfree, subdir);
+             make_cleanup (xfree, subdir);
              strcpy (subdir, this_dir + pdir_len + 1);
            }
          rc = try_thread_db_load_from_pdir (subdir);
-         if (free_subdir_cleanup != NULL)
-           do_cleanups (free_subdir_cleanup);
+         do_cleanups (free_subdir_cleanup);
          if (rc)
            break;
        }
@@ -1926,8 +1927,7 @@ info_auto_load_libthread_db (char *args, int from_tty)
   char *pids;
   int i;
 
-  while (isspace (*cs))
-    cs++;
+  cs = skip_spaces_const (cs);
   if (*cs)
     error (_("'info auto-load libthread-db' does not accept any parameters"));
 
This page took 0.029612 seconds and 4 git commands to generate.