From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32216 invoked by alias); 18 Dec 2013 11:16:53 -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 32204 invoked by uid 89); 18 Dec 2013 11:16:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 18 Dec 2013 11:16:52 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rBIBGnuk006459 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 18 Dec 2013 06:16:50 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id rBIBGmkX012654; Wed, 18 Dec 2013 06:16:49 -0500 Message-ID: <52B18420.5060303@redhat.com> Date: Wed, 18 Dec 2013 11:16:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Doug Evans CC: gdb-patches@sourceware.org Subject: Re: [PATCH 3/6] gdbserver: Add debugging printf when setting last_resume_kind. References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-12/txt/msg00693.txt.bz2 On 12/17/2013 09:45 PM, Doug Evans wrote: > Hi. > > This patch adds a debugging printf to the setting of last_resume_kind > which I found useful while debugging 16168. > > 2013-12-17 Doug Evans > > * linux-low.c (resume_kind_to_str): New function. > (linux_set_resume_request): Add debugging printf when setting > last_resume_kind. > > --- > gdb/gdbserver/linux-low.c | 25 +++++++++++++++++++++++++ > 1 file changed, 25 insertions(+) > > diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c > index 464aaf0..3883e50 100644 > --- a/gdb/gdbserver/linux-low.c > +++ b/gdb/gdbserver/linux-low.c > @@ -3301,6 +3301,24 @@ struct thread_resume_array > size_t n; > }; > > +/* Return the string name of KIND. */ > + > +static const char * > +resume_kind_to_str (enum resume_kind kind) > +{ > + switch (kind) > + { > + case resume_continue: > + return "resume_continue"; Can you do this with a macro please? See lynx-low.c:ptrace_request_to_str for example. OK with that change. > + case resume_step: > + return "resume_step"; > + case resume_stop: > + return "resume_stop"; > + default: > + gdb_assert_not_reached ("bad resume_kind"); > + } > +} > + -- Pedro Alves