From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24466 invoked by alias); 2 Nov 2012 16:15:28 -0000 Received: (qmail 24445 invoked by uid 22791); 2 Nov 2012 16:15:25 -0000 X-SWARE-Spam-Status: No, hits=-5.4 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,KHOP_RCVD_TRUST,KHOP_SPAMHAUS_DROP,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail-lb0-f201.google.com (HELO mail-lb0-f201.google.com) (209.85.217.201) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 02 Nov 2012 16:15:19 +0000 Received: by mail-lb0-f201.google.com with SMTP id n8so240061lbj.0 for ; Fri, 02 Nov 2012 09:15:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:content-type:content-transfer-encoding:message-id:date :to:cc:subject:in-reply-to:references:x-mailer:from :x-gm-message-state; bh=IwZ6RGwEAaCbC4C9/JnTK1xfXW5ZnbpdD6Xd1vxq8IE=; b=XfnILaJO7xAPUpd3Jjd31HXB6PvE7mGo0THbLfdH870kDFlb+9fpOBUogB1j4BhLfv H0+5Y0O1yGZBfDmA0k4QX3wyNj+4VT6v+rz8YDX9+q6LYcIBJ/zcJgld/AN1B075+yNc FNYSaL0L1keivQMMswktEgpLtTT5y20WhVSw+b94/Z95wyM/4GNMVQ31hqPIlPF+PDR/ Bb89aodAboc3oU4LNliInauX6pXMLnMKdILCmX2Tg/408wYCAr6mGgYptEUJvnJRgMTF 4Un+Ae3aRdGrFb5xesFBQU4/zQZ0+i6kZlY88ohEDhOoEZ5Xvb48q4rgKfvkGNqrci2M DSHg== Received: by 10.181.13.75 with SMTP id ew11mr883480wid.0.1351872917300; Fri, 02 Nov 2012 09:15:17 -0700 (PDT) Received: from hpza9.eem.corp.google.com ([74.125.121.33]) by gmr-mx.google.com with ESMTPS id e5si144635wiw.0.2012.11.02.09.15.17 (version=TLSv1/SSLv3 cipher=AES128-SHA); Fri, 02 Nov 2012 09:15:17 -0700 (PDT) Received: from ruffy2.mtv.corp.google.com (ruffy2.mtv.corp.google.com [172.17.128.107]) by hpza9.eem.corp.google.com (Postfix) with ESMTP id D76735C0060; Fri, 2 Nov 2012 09:15:15 -0700 (PDT) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <20627.61842.606081.697743@ruffy2.mtv.corp.google.com> Date: Fri, 02 Nov 2012 16:15:00 -0000 To: Yao Qi Cc: ali_anwar , Subject: Re: Patch to propagate GDB's knowledge of the executing state to frontend In-Reply-To: <508F719C.2080409@codesourcery.com> References: <50891E05.7050509@codesourcery.com> <508F719C.2080409@codesourcery.com> From: dje@google.com X-Gm-Message-State: ALoCoQm+iB2DePoP71s7HCb86vLZnWQWerOg9jNo7egym7AYXBVis7WSkBnLdPCspvSyi+MVlWPTHgQQoILBLRCbhycTCKmCHCzDOY3sZg01YhXTAiYNOn5mhCIdagumRCsdS3F/UtkbiqeyAvQspGDuK2SgmjgMKFleYqrxQGm4di6vUy8Srz+abUM4ZK3EHtlbjcqZsUrzcKsDgk1OzyxEHV+7m2nC8Q== 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: 2012-11/txt/msg00047.txt.bz2 Yao Qi writes: > On 10/25/2012 07:09 PM, ali_anwar wrote: > > [...] > > @@ -1,3 +1,13 @@ > > +2012-10-25 Ali Anwar > > + > > + * infrun.c (handle_inferior_event_stub, regcache_dup_stub): > > + New functions. > > + (normal_stop): Change to propagate GDB's knowledge of the > > + executing state to frontend when not able to fetch registers. > > + (wait_for_inferior): Chnage to propagate GDB's knowledge of > ^^^^^^ typo > > > > + the executing state if not able to fetch backtrace once the > > + step has already occured. > ^^^^^^^ typo. > > In each changelog entry, we'll put 'what do we change' instead of 'why > do we change in this way'. So this entry can be simplified. Hi. I agree with your first sentence, and would add that if such an explanation is needed, it belongs in the code not the changelog. [We don't have enough comments in the code explaining *why* things are the way they are.] But I'd say that's not the case here, at least for the changelog entries. Instead, I would remove the leading "Change to", and just say "Propagate ...". Also, I would add a comment to the code explaining *why* the calls are wrapped in catch_error (and I would have the comment live at the call to catch_error, not in the definition of the two new stubs). One could also say the two new functions also require comments, but they're pretty simple and hook_stop_stub doesn't have a comment, so I'd be ok with leaving them out.