From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28293 invoked by alias); 18 Apr 2008 10:10:18 -0000 Received: (qmail 28116 invoked by uid 22791); 18 Apr 2008 10:10:16 -0000 X-Spam-Check-By: sourceware.org Received: from viper.snap.net.nz (HELO viper.snap.net.nz) (202.37.101.25) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 18 Apr 2008 10:09:40 +0000 Received: from kahikatea.snap.net.nz (132.61.255.123.dynamic.snap.net.nz [123.255.61.132]) by viper.snap.net.nz (Postfix) with ESMTP id 5CE8A3DA2B0 for ; Fri, 18 Apr 2008 22:09:36 +1200 (NZST) Received: by kahikatea.snap.net.nz (Postfix, from userid 1000) id 2862C8FC6D; Fri, 18 Apr 2008 22:09:33 +1200 (NZST) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18440.29531.916381.569346@kahikatea.snap.net.nz> Date: Fri, 18 Apr 2008 16:06:00 -0000 To: gdb-patches@sources.redhat.com Subject: [PATCH] New annotation for threads X-Mailer: VM 7.19 under Emacs 22.2.50.2 X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-04/txt/msg00383.txt.bz2 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 * 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 #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; }