Message ID | 1475258387-26605-1-git-send-email-Anton.Kolesov@synopsys.com |
---|---|
State | Committed |
Headers |
Received: (qmail 34771 invoked by alias); 30 Sep 2016 18:00:01 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: <gdb-patches.sourceware.org> List-Unsubscribe: <mailto:gdb-patches-unsubscribe-##L=##H@sourceware.org> List-Subscribe: <mailto:gdb-patches-subscribe@sourceware.org> List-Archive: <http://sourceware.org/ml/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-help@sourceware.org>, <http://sourceware.org/ml/#faqs> Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 34747 invoked by uid 89); 30 Sep 2016 18:00:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.5 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=increasing X-HELO: smtprelay.synopsys.com Received: from smtprelay4.synopsys.com (HELO smtprelay.synopsys.com) (198.182.47.9) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 30 Sep 2016 17:59:59 +0000 Received: from dc8secmta2.synopsys.com (dc8secmta2.synopsys.com [10.13.218.202]) by smtprelay.synopsys.com (Postfix) with ESMTP id 0560724E0BBB for <gdb-patches@sourceware.org>; Fri, 30 Sep 2016 10:59:58 -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 EC24EA4112 for <gdb-patches@sourceware.org>; Fri, 30 Sep 2016 10:59:57 -0700 (PDT) Received: from mailhost.synopsys.com (unknown [10.13.184.66]) by dc8secmta2.internal.synopsys.com (Service) with ESMTP id CDF56A4102 for <gdb-patches@sourceware.org>; Fri, 30 Sep 2016 10:59:57 -0700 (PDT) Received: from mailhost.synopsys.com (localhost [127.0.0.1]) by mailhost.synopsys.com (Postfix) with ESMTP id BEFD1DA2; Fri, 30 Sep 2016 10:59:57 -0700 (PDT) Received: from akolesov-lab.internal.synopsys.com (akolesov-lab.internal.synopsys.com [10.121.8.134]) by mailhost.synopsys.com (Postfix) with ESMTP id A4BC9D99; Fri, 30 Sep 2016 10:59:56 -0700 (PDT) From: Anton Kolesov <Anton.Kolesov@synopsys.com> To: gdb-patches@sourceware.org Cc: Anton Kolesov <Anton.Kolesov@synopsys.com>, Francois Bedard <Francois.Bedard@synopsys.com> Subject: [PATCH] arc: Remove annoying debug message Date: Fri, 30 Sep 2016 20:59:47 +0300 Message-Id: <1475258387-26605-1-git-send-email-Anton.Kolesov@synopsys.com> |
Commit Message
Anton Kolesov
Sept. 30, 2016, 5:59 p.m. UTC
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(-)
Comments
On Fri, Sep 30, 2016 at 6:59 PM, Anton Kolesov <Anton.Kolesov@synopsys.com> wrote: > 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. Patch is good to me.
Hi, I was wondering if it would not be better to restrict such debug for higher debugging levels. 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. Thus another modification could be: if (arc_debug > 1) debug_printf ("arc: frame_prev_register (regnum = %d)\n", regnum); Similar code is already used for record_debug or gdbarch_debug variables. Pierre Muller > -----Message d'origine----- > De : gdb-patches-owner@sourceware.org [mailto:gdb-patches- > owner@sourceware.org] De la part de Anton Kolesov > Envoyé : vendredi 30 septembre 2016 20:00 > À : gdb-patches@sourceware.org > Cc : Anton Kolesov; Francois Bedard > Objet : [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 = %d)\n", regnum); > - > if (*this_cache == NULL) > *this_cache = arc_make_frame_cache (this_frame); > struct arc_frame_cache *cache = (struct arc_frame_cache *) > (*this_cache); > -- > 2.8.1
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 then 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' <Anton.Kolesov@synopsys.com> > Cc: gdb-patches@sourceware.org > Subject: RE: [PATCH] arc: Remove annoying debug message > > Hi, > > I was wondering if it would not be better to > restrict such debug for higher debugging levels. > > 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. > > Thus another modification could be: > > if (arc_debug > 1) > debug_printf ("arc: frame_prev_register (regnum = %d)\n", regnum); > > Similar code is already used for record_debug or > gdbarch_debug variables. > > > Pierre Muller > > > -----Message d'origine----- > > De : gdb-patches-owner@sourceware.org [mailto:gdb-patches- > > owner@sourceware.org] De la part de Anton Kolesov > > Envoyé : vendredi 30 septembre 2016 20:00 > > À : gdb-patches@sourceware.org > > Cc : Anton Kolesov; Francois Bedard > > Objet : [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 = %d)\n", regnum); > > - > > if (*this_cache == NULL) > > *this_cache = arc_make_frame_cache (this_frame); > > struct arc_frame_cache *cache = (struct arc_frame_cache *) > > (*this_cache); > > -- > > 2.8.1
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 = %d)\n", regnum); - if (*this_cache == NULL) *this_cache = arc_make_frame_cache (this_frame); struct arc_frame_cache *cache = (struct arc_frame_cache *) (*this_cache);