This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] New annotation for threads


This is just an annotation equivalent of Vladimir's patch for an observer
for new threads.

-- 
Nick                                           http://www.inet.net.nz/~nickrob


2008-04-18  Nick Roberts  <nickrob@snap.net.nz>

	* annotate.h: (annotate_new_thread): New extern.

	* annotate.c (annotate_new_thread): New function.

	* thread.c (add_thread_with_info): Use it.


** annotate.h	10 Jan 2008 11:34:22 +1300	1.9
--- annotate.h	18 Apr 2008 17:30:37 +1200	
*************** extern void annotate_record (void);
*** 43,48 ****
--- 43,49 ----
  extern void annotate_breakpoints_table_end (void);
  
  extern void annotate_frames_invalid (void);
+ extern void annotate_new_thread (void);
  
  struct type;
  
*** annotate.c	10 Jan 2008 11:34:21 +1300	1.15
--- annotate.c	18 Apr 2008 17:29:19 +1200	
*************** annotate_frames_invalid (void)
*** 234,239 ****
--- 234,248 ----
  }
  
  void
+ annotate_new_thread (void)
+ {
+   if (annotation_level > 1)
+     {
+       printf_unfiltered (("\n\032\032new-thread\n"));
+     }
+ }
+ 
+ void
  annotate_field_begin (struct type *type)
  {
    if (annotation_level == 2)


*** thread.c	25 Mar 2008 08:17:29 +1200	1.65
--- thread.c	18 Apr 2008 17:31:41 +1200	
***************
*** 40,45 ****
--- 40,46 ----
  #include <signal.h>
  #include "ui-out.h"
  #include "observer.h"
+ #include "annotate.h"
  
  /* Definition of struct thread_info exported to gdbthread.h */
  
*************** add_thread_with_info (ptid_t ptid, struc
*** 140,146 ****
      printf_unfiltered (_("[New %s]\n"), target_pid_to_str (ptid));
  
    observer_notify_new_thread (result);
!   
    return result;
  }
  
--- 141,148 ----
      printf_unfiltered (_("[New %s]\n"), target_pid_to_str (ptid));
  
    observer_notify_new_thread (result);
!   annotate_new_thread ();
!  
    return result;
  }
  


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]