gdb: don't print escape characters when a style is disabled
[deliverable/binutils-gdb.git] / gdb / tracectf.c
index 5abfc1b56d013188ec7077409859678ece175c84..38c327dd1df0f9aa32b54b4b16dd36c510413dfb 100644 (file)
@@ -1,6 +1,6 @@
 /* CTF format support.
 
-   Copyright (C) 2012-2020 Free Software Foundation, Inc.
+   Copyright (C) 2012-2021 Free Software Foundation, Inc.
    Contributed by Hui Zhu <hui_zhu@mentor.com>
    Contributed by Yao Qi <yao@codesourcery.com>
 
@@ -1168,13 +1168,14 @@ ctf_target_open (const char *dirname, int from_tty)
   push_target (&ctf_ops);
 
   inferior_appeared (current_inferior (), CTF_PID);
-  inferior_ptid = ptid_t (CTF_PID);
-  add_thread_silent (inferior_ptid);
+
+  thread_info *thr = add_thread_silent (&ctf_ops, ptid_t (CTF_PID));
+  switch_to_thread (thr);
 
   merge_uploaded_trace_state_variables (&uploaded_tsvs);
   merge_uploaded_tracepoints (&uploaded_tps);
 
-  post_create_inferior (&ctf_ops, from_tty);
+  post_create_inferior (from_tty);
 }
 
 /* This is the implementation of target_ops method to_close.  Destroy
@@ -1187,7 +1188,7 @@ ctf_target::close ()
   xfree (trace_dirname);
   trace_dirname = NULL;
 
-  inferior_ptid = null_ptid;   /* Avoid confusion from thread stuff.  */
+  switch_to_no_thread ();      /* Avoid confusion from thread stuff.  */
   exit_inferior_silent (current_inferior ());
 
   trace_reset_local_state ();
@@ -1721,8 +1722,9 @@ ctf_target::traceframe_info ()
 
 /* module initialization */
 
+void _initialize_ctf ();
 void
-_initialize_ctf (void)
+_initialize_ctf ()
 {
 #if HAVE_LIBBABELTRACE
   add_target (ctf_target_info, ctf_target_open, filename_completer);
This page took 0.04645 seconds and 4 git commands to generate.