Make target_ops::has_execution take an 'inferior *' instead of a ptid_t
[deliverable/binutils-gdb.git] / gdb / linux-thread-db.c
index 1d32e9195c041d5653c8bdfcc906d0f351fee8f1..62908896cc61b10c37ef5ff0cf6f3a73987d63a2 100644 (file)
@@ -1,6 +1,6 @@
 /* libthread_db assisted debugging support, generic parts.
 
-   Copyright (C) 1999-2019 Free Software Foundation, Inc.
+   Copyright (C) 1999-2020 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -48,6 +48,7 @@
 #include <algorithm>
 #include "gdbsupport/pathstuff.h"
 #include "valprint.h"
+#include "cli/cli-style.h"
 
 /* GNU/Linux libthread_db support.
 
@@ -110,13 +111,13 @@ public:
 
 static char *libthread_db_search_path;
 
-/* Set to non-zero if thread_db auto-loading is enabled
+/* Set to true if thread_db auto-loading is enabled
    by the "set auto-load libthread-db" command.  */
-static int auto_load_thread_db = 1;
+static bool auto_load_thread_db = true;
 
-/* Set to non-zero if load-time libthread_db tests have been enabled
-   by the "maintenence set check-libthread-db" command.  */
-static int check_thread_db_on_load = 0;
+/* Set to true if load-time libthread_db tests have been enabled
+   by the "maintenance set check-libthread-db" command.  */
+static bool check_thread_db_on_load = false;
 
 /* "show" command for the auto_load_thread_db configuration variable.  */
 
@@ -933,8 +934,9 @@ try_thread_db_load_1 (struct thread_db_info *info)
         enabled.  User visible output should not depend on debug
         settings.  */
       file = *libthread_db_search_path != '\0' ? gdb_stdout : gdb_stdlog;
-      fprintf_unfiltered (file, _("Using host libthread_db library \"%s\".\n"),
-                         library);
+      fprintf_unfiltered (file,
+                         _("Using host libthread_db library \"%ps\".\n"),
+                         styled_string (file_name_style.style (), library));
     }
 
   /* The thread library was detected.  Activate the thread_db target
@@ -1028,7 +1030,8 @@ try_thread_db_load_from_pdir_1 (struct objfile *obj, const char *subdir)
   if (obj_name[0] != '/')
     {
       warning (_("Expected absolute pathname for libpthread in the"
-                " inferior, but got %s."), obj_name);
+                " inferior, but got %ps."),
+              styled_string (file_name_style.style (), obj_name));
       return false;
     }
 
@@ -1619,7 +1622,7 @@ thread_db_target::update_thread_list ()
         stop.  That uses thread_db entry points that do not walk
         libpthread's thread list, so should be safe, as well as more
         efficient.  */
-      if (target_has_execution_1 (thread->ptid))
+      if (thread->inf->has_execution ())
        continue;
 
       thread_db_find_new_threads_1 (thread);
This page took 0.027123 seconds and 4 git commands to generate.