From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 81444 invoked by alias); 3 Oct 2016 10:13:52 -0000 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 Received: (qmail 77094 invoked by uid 89); 3 Oct 2016 10:13:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.7 required=5.0 tests=AWL,BAYES_50,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=U*owner, U*gdb-patches-owner, gdbpatchesownersourcewareorg, gdb-patches-owner@sourceware.org X-HELO: smtprelay.synopsys.com Received: from us01smtprelay-2.synopsys.com (HELO smtprelay.synopsys.com) (198.182.47.9) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 03 Oct 2016 10:13:41 +0000 Received: from dc8secmta2.synopsys.com (dc8secmta2.synopsys.com [10.13.218.202]) by smtprelay.synopsys.com (Postfix) with ESMTP id 12D6424E05D8; Mon, 3 Oct 2016 03:13:39 -0700 (PDT) Received: from dc8secmta2.internal.synopsys.com (dc8secmta2.internal.synopsys.com [127.0.0.1]) by dc8secmta2.internal.synopsys.com (Service) with ESMTP id CF6A0A4112; Mon, 3 Oct 2016 03:13:39 -0700 (PDT) Received: from mailhost.synopsys.com (mailhost1.synopsys.com [10.12.238.239]) by dc8secmta2.internal.synopsys.com (Service) with ESMTP id 991BEA4102; Mon, 3 Oct 2016 03:13:39 -0700 (PDT) Received: from mailhost.synopsys.com (localhost [127.0.0.1]) by mailhost.synopsys.com (Postfix) with ESMTP id 884468C5; Mon, 3 Oct 2016 03:13:39 -0700 (PDT) Received: from us01wehtc1.internal.synopsys.com (us01wehtc1.internal.synopsys.com [10.12.239.235]) by mailhost.synopsys.com (Postfix) with ESMTP id 2FAFF8C4; Mon, 3 Oct 2016 03:13:39 -0700 (PDT) Received: from DE02WEHTCB.internal.synopsys.com (10.225.19.94) by us01wehtc1.internal.synopsys.com (10.12.239.235) with Microsoft SMTP Server (TLS) id 14.3.266.1; Mon, 3 Oct 2016 03:13:39 -0700 Received: from DE02WEMBXB.internal.synopsys.com ([fe80::95ce:118a:8321:a099]) by DE02WEHTCB.internal.synopsys.com ([::1]) with mapi id 14.03.0266.001; Mon, 3 Oct 2016 12:13:37 +0200 From: Anton Kolesov To: Pierre Muller CC: "gdb-patches@sourceware.org" Subject: RE: [PATCH] arc: Remove annoying debug message Date: Mon, 03 Oct 2016 10:13:00 -0000 Message-ID: <39A54937CC95F24AA2F794E2D2B66B13581BC31A@DE02WEMBXB.internal.synopsys.com> References: <1475258387-26605-1-git-send-email-Anton.Kolesov@synopsys.com> <57eed484.876ec20a.3e3ee.31a6SMTPIN_ADDED_BROKEN@mx.google.com> In-Reply-To: <57eed484.876ec20a.3e3ee.31a6SMTPIN_ADDED_BROKEN@mx.google.com> Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-SW-Source: 2016-10/txt/msg00015.txt.bz2 Hi Pierre, Increasing a debug level of this message is an option I've considered, and to be honest I don't have a hard opinion on what is better. My argument to remove this message completely is that it is not very useful for anything - if one is doing a printf-based debugging, then this message is unlikely to help, so one would have to edit source code and add more printfs, and if is debugging with a debugger, then this message is useless to begin with. I'd think that for this message to be at least mildly useful, debugger should t= hen print the returned value of a register - result of this function execution. Anton > -----Original Message----- > From: Pierre Muller [mailto:pierre.muller@ics-cnrs.unistra.fr] > Sent: Saturday, October 01, 2016 12:09 AM > To: 'Anton Kolesov' > Cc: gdb-patches@sourceware.org > Subject: RE: [PATCH] arc: Remove annoying debug message >=20 > Hi, >=20 > I was wondering if it would not be better to > restrict such debug for higher debugging levels. >=20 > According to _initialize_arc_tdep, > arc_debug is an integer value, and can thus be set to values above 1, > to get more verbose output. >=20 > Thus another modification could be: >=20 > if (arc_debug > 1) > debug_printf ("arc: frame_prev_register (regnum =3D %d)\n", regnum); >=20 > Similar code is already used for record_debug or > gdbarch_debug variables. >=20 >=20 > Pierre Muller >=20 > > -----Message d'origine----- > > De=A0: gdb-patches-owner@sourceware.org [mailto:gdb-patches- > > owner@sourceware.org] De la part de Anton Kolesov > > Envoy=E9=A0: vendredi 30 septembre 2016 20:00 > > =C0=A0: gdb-patches@sourceware.org > > Cc=A0: Anton Kolesov; Francois Bedard > > Objet=A0: [PATCH] arc: Remove annoying debug message > > > > This logging message is called too often - once for each register when > > it's > > value has to be evaluated. This floods the screen for commands like > > "info > > register all", but doesn't give really any help at debugging GDB > > issues. > > Between increasing the debug level of this message and removing it > > altogether I > > think that removing it is preferable. > > > > gdb/ChangeLog: > > > > arc-tdep.c (arc_frame_prev_register): Remove annoying log > > message. > > --- > > gdb/arc-tdep.c | 3 --- > > 1 file changed, 3 deletions(-) > > > > diff --git a/gdb/arc-tdep.c b/gdb/arc-tdep.c > > index 7bb93ad..60a4e04 100644 > > --- a/gdb/arc-tdep.c > > +++ b/gdb/arc-tdep.c > > @@ -876,9 +876,6 @@ static struct value * > > arc_frame_prev_register (struct frame_info *this_frame, > > void **this_cache, int regnum) > > { > > - if (arc_debug) > > - debug_printf ("arc: frame_prev_register (regnum =3D %d)\n", regnum= ); > > - > > if (*this_cache =3D=3D NULL) > > *this_cache =3D arc_make_frame_cache (this_frame); > > struct arc_frame_cache *cache =3D (struct arc_frame_cache *) > > (*this_cache); > > -- > > 2.8.1