From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13721 invoked by alias); 15 Jun 2011 15:53:52 -0000 Received: (qmail 13711 invoked by uid 22791); 15 Jun 2011 15:53:51 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST X-Spam-Check-By: sourceware.org Received: from mail-fx0-f41.google.com (HELO mail-fx0-f41.google.com) (209.85.161.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 15 Jun 2011 15:53:33 +0000 Received: by fxm18 with SMTP id 18so629705fxm.0 for ; Wed, 15 Jun 2011 08:53:32 -0700 (PDT) Received: by 10.223.143.6 with SMTP id s6mr775767fau.74.1308153212154; Wed, 15 Jun 2011 08:53:32 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.99.80 with HTTP; Wed, 15 Jun 2011 08:52:52 -0700 (PDT) In-Reply-To: <201106151127.12684.pedro@codesourcery.com> References: <201106131321.33532.pedro@codesourcery.com> <201106151127.12684.pedro@codesourcery.com> From: Hui Zhu Date: Wed, 15 Jun 2011 15:53:00 -0000 Message-ID: Subject: Re: [RFA] tracepoint remote.c:remote_trace_set_readonly_regions give up some regions if it is number is too big To: Pedro Alves Cc: gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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: 2011-06/txt/msg00216.txt.bz2 On Wed, Jun 15, 2011 at 18:27, Pedro Alves wrote: > On Wednesday 15 June 2011 08:33:46, Hui Zhu wrote: >> On Mon, Jun 13, 2011 at 20:21, Pedro Alves wrot= e: >> > Note that if your stub supports qXfer:traceframe-info:read, this packet >> > is no longer necessary to support, as GDB will handle reading from >> > readonly sections out of live memory itself. =A0I think this >> > means that the warning should only be output >> > if remote_protocol_packets[PACKET_qXfer_traceframe_info].support >> > is not PACKET_ENABLE? >> >> GDB can do that with itself? That is really cool. >> All this function is implemented inside remote.c? > > No, it's in: > > =A0 target.c:memory_xfer_partial > =A0 =A0 target.c:traceframe_available_memory > =A0 =A0 target.c:memory_xfer_live_readonly_partial > >> What I suggest is if not need, don't send the QTro. > > Could work too. =A0It would still be the same > remote_protocol_packets[PACKET_qXfer_traceframe_info].support > check... > >> And I suggest we always enable this check inside the function. > > That was never in question. =A0I was only talking about silencing > the _warning_. Sorry for misunderstand your mean. I post a new patch for it. Please help me review it. > >> 2011-06-15 =A0Hui Zhu =A0 >> >> =A0 =A0 =A0 * remote.c (remote_trace_set_readonly_regions): Add a check = for >> =A0 =A0 =A0 target_buf_size. > > Okay. Checked in to 7.3 and trunk. > > -- > Pedro Alves > Thanks, Hui 2011-06-15 Hui Zhu * remote.c (remote_trace_set_readonly_regions): Add check for remote_protocol_packets[PACKET_qXfer_traceframe_info].support before output warning. --- remote.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/remote.c +++ b/remote.c @@ -10001,7 +10001,9 @@ remote_trace_set_readonly_regions (void) sec_length =3D 1 + strlen (tmp1) + 1 + strlen (tmp2); if (offset + sec_length + 1 > target_buf_size) { - warning (_("\ + if (remote_protocol_packets[PACKET_qXfer_traceframe_info].support + !=3D PACKET_ENABLE) + warning (_("\ Too many sections for read-only sections definition packet.")); break; }