From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7043 invoked by alias); 30 May 2009 19:25:10 -0000 Received: (qmail 7029 invoked by uid 22791); 30 May 2009 19:25:09 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.33.17) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 30 May 2009 19:25:04 +0000 Received: from wpaz5.hot.corp.google.com (wpaz5.hot.corp.google.com [172.24.198.69]) by smtp-out.google.com with ESMTP id n4UJP1sp027278 for ; Sat, 30 May 2009 20:25:01 +0100 Received: from yw-out-1718.google.com (ywk9.prod.google.com [10.192.11.9]) by wpaz5.hot.corp.google.com with ESMTP id n4UJOxUE007320 for ; Sat, 30 May 2009 12:25:00 -0700 Received: by yw-out-1718.google.com with SMTP id 9so3415962ywk.14 for ; Sat, 30 May 2009 12:24:59 -0700 (PDT) MIME-Version: 1.0 Received: by 10.90.93.17 with SMTP id q17mr1627760agb.89.1243711499516; Sat, 30 May 2009 12:24:59 -0700 (PDT) In-Reply-To: <1243638987-4533-2-git-send-email-naesten@gmail.com> References: <1243638987-4533-1-git-send-email-naesten@gmail.com> <1243638987-4533-2-git-send-email-naesten@gmail.com> Date: Sat, 30 May 2009 19:25:00 -0000 Message-ID: Subject: Re: [PATCH 2/2] Add "set/show debug unwinder" prefix commands. From: Doug Evans To: Samuel Bronson Cc: gdb-patches@sourceware.org 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: 2009-05/txt/msg00653.txt.bz2 On Fri, May 29, 2009 at 4:16 PM, Samuel Bronson wrote: > Also add one subcommand for tracing the sniffing of stack frames by > unwinders. > > [...] > +/* trace unwinders called */ > +static int trace_unwinders; [N.B. None of this is binding. Just "fwiw".] Just some nits: I don't care *too* much about the naming, but I do care about following existing conventions and gdb seems to have a pretty consistent convention of using "debug" in these situations instead of "trace". E.g., debug_unwinders? > =A0void > =A0_initialize_frame_unwind (void) > =A0{ > =A0 frame_unwind_data =3D gdbarch_data_register_pre_init (frame_unwind_in= it); > + > + =A0add_prefix_cmd ("unwinder", class_maintenance, set_debug_unwinder_cm= d, _("\ > +Set stack frame unwinder debugging variables."), > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 &set_debug_unwinder_list, "set debug un= winder ", > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 0, &setdebuglist); > + > + =A0add_prefix_cmd ("unwinder", class_maintenance, show_debug_unwinder_c= md, _("\ > +Show stack frame unwinder debugging variables."), > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 &show_debug_unwinder_list, "set debug u= nwinder ", > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 0, &showdebuglist); > + > + =A0add_setshow_boolean_cmd ("trace-tried", class_maintenance, &trace_un= winders, > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0_("Set tracing of un= winders tried."), > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0_("Show tracing of u= nwinders tried."), > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0NULL /* main doc */, > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0NULL, NULL, > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0&set_debug_unwinder_= list, &show_debug_unwinder_list); > =A0} Adding another level of prefixes just for debugging the unwinder seems excessive.