From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26068 invoked by alias); 10 May 2011 20:51:47 -0000 Received: (qmail 26058 invoked by uid 22791); 10 May 2011 20:51:46 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.44.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 10 May 2011 20:51:30 +0000 Received: from wpaz37.hot.corp.google.com (wpaz37.hot.corp.google.com [172.24.198.101]) by smtp-out.google.com with ESMTP id p4AKpUrd030462 for ; Tue, 10 May 2011 13:51:30 -0700 Received: from ywl2 (ywl2.prod.google.com [10.192.12.2]) by wpaz37.hot.corp.google.com with ESMTP id p4AKopMv013274 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Tue, 10 May 2011 13:51:29 -0700 Received: by ywl2 with SMTP id 2so2857141ywl.26 for ; Tue, 10 May 2011 13:51:29 -0700 (PDT) MIME-Version: 1.0 Received: by 10.150.14.13 with SMTP id 13mr7566253ybn.438.1305060687857; Tue, 10 May 2011 13:51:27 -0700 (PDT) Received: by 10.150.186.1 with HTTP; Tue, 10 May 2011 13:51:27 -0700 (PDT) In-Reply-To: <20110510204641.A4C73246199@ruffy.mtv.corp.google.com> References: <20110510204641.A4C73246199@ruffy.mtv.corp.google.com> Date: Tue, 10 May 2011 20:51:00 -0000 Message-ID: Subject: Re: [RFA] Remove set debug lin-lwp-async, new ui_file.to_write_async_safe From: Doug Evans To: gdb-patches@sourceware.org, pedro@codesourcery.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true 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: 2011-05/txt/msg00260.txt.bz2 [sorry for the resend] Oh, btw, Heh, forgot ... testsuite run is in progress. Will amend as necessary. On Tue, May 10, 2011 at 1:46 PM, Doug Evans wrote: > > Hi. > > This patch does two things. > > 1) Remove debug_linux_nat_async, replacing all uses with debug_linux_nat. > > 2) Fix the debug printf in sigchld_handler. > > Adding to_write_async_safe (and the associated scaffolding) just > for sigchld_handler may seem like a lot, but I *like* having a > debug printf in sigchld_handler. =A0And given that it might be > invoked more often now, I think we need to fix it and use a > more signal-safe debug printer. > I haven't added the higher level of abstraction (fprintf_unfiltered_async= _safe > or some such) and, e.g. the associated gettimeofday handling. > That can be done later if it's useful enough. > > Pedro mentioned there being a lot more output because of this. > I like what's there now, but I can imagine some tweaking may > be needed. =A0I'd like to add some more debug printfs here, > and I wouldn't mind having "set debug lin-lwp N" where N would > specify a level of verbosity (0,1,2 at most probably). > > Ok to check in? > > 2011-05-10 =A0Doug Evans =A0 > > =A0 =A0 =A0 =A0* linux-nat.c (debug_linux_nat_async): Delete. > =A0 =A0 =A0 =A0Replace all references to use debug_linux_nat instead. > =A0 =A0 =A0 =A0(show_debug_linux_nat_async): Delete. > =A0 =A0 =A0 =A0(sigchld_handler): Call ui_file_write_async_safe instead of > =A0 =A0 =A0 =A0fprintf_unfiltered. > =A0 =A0 =A0 =A0(_initialize_linux_nat): Remove `set debug lin-lwp-async'. > =A0 =A0 =A0 =A0* ui-file.c (struct ui_file): New member to_write_async_sa= fe. > =A0 =A0 =A0 =A0(null_file_write_async_safe): New function. > =A0 =A0 =A0 =A0(ui_file_write_async_safe): New function. > =A0 =A0 =A0 =A0(set_ui_file_write_async_safe): New function. > =A0 =A0 =A0 =A0(stdio_file_new): Initialize to_write_async_safe. > =A0 =A0 =A0 =A0(stdio_file_write_async_safe): New function. > =A0 =A0 =A0 =A0* ui-file.h (ui_file_write_async_safe_ftype): New typedef. > =A0 =A0 =A0 =A0(set_ui_file_write_async_safe): Declare. > =A0 =A0 =A0 =A0(ui_file_write_async_safe): Declare. > > =A0 =A0 =A0 =A0doc/ > =A0 =A0 =A0 =A0* gdb.texinfo (Completion): Update example.