Re: [patch] Change trace buffer size(v5)

Abid, Hafiz
2013-05-03T11:38:10Z

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="us-ascii"; delsp=Yes; format=Flowed, Size: 6974 bytes --]

On 02/05/13 18:31:36, Pedro Alves wrote:
> Hi!
>
> Unfortunately, I just noticed that this broke "tstart" if a
> trace run is already running:
>
> (gdb) tstart
> A trace is running already. Start a new run? (y or n) y
> Sending packet: $QTinit#59...Packet received: OK
> Sending packet: $QTDP:3:0000000000410296:E:0:0#49...Packet received:
> OK
> Sending packet: $QTDPsrc:3:410296:at:0:4:6d61696e#8a...Packet
> received: OK
> Sending packet:
> $QTDV:1:0000000000000000:1:74726163655f74696d657374616d70#4f...Packet
> received: OK
> Sending packet:
> $:0000000000400200,000000000040021c:000000000040021c,000000000040023c:000000000040023c,0000000000400260:0000000000400260,00000000004002c0:00000000004002c0,0000000000400ff8:0000000000400ff8,000000000040149e:000000000040149e,00000000004015b8:00000000004015b8,0000000000401628:0000000000401628,0000000000401688:0000000000401688,0000000000402210:0000000000402210,000000000040221e:0000000000402220,00000000004029e0:00000000004029e0,000000000043a230:000000000043a230,000000000043a239:000000000043a240,000000000044cafd:000000000044cb00,000000000044e834:000000000044e838,00000000004560a4#ab...Packet
> received:
> Sending packet: $QTDisconnected:0#e2...Packet received: OK
> Sending packet: $QTBuffer:circular:0#f8...Packet received: OK
> Sending packet: $QTBuffer:size:-1#8c...Packet received: E01
> Target returns error code '01'.
> (gdb)
>
> Perhaps gdbserver's QTinit handling should be calling
> stop_tracing?
>
> --
> Pedro Alves
>
>
Hi Pedro,
Thanks for letting me know. There is a testcase in
status-stop.exp(test_tstart_tstart) to check this case but it is not
working as intended. I will work on a patch.

Regards,
Abid
From gdb-patches-return-101045-listarch-gdb-patches=sources.redhat.com@sourceware.org Fri May 03 12:57:41 2013
Return-Path: <gdb-patches-return-101045-listarch-gdb-patches=sources.redhat.com@sourceware.org>
Delivered-To: listarch-gdb-patches@sources.redhat.com
Received: (qmail 13035 invoked by alias); 3 May 2013 12:57:41 -0000
Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm
Precedence: bulk
List-Id: <gdb-patches.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 13000 invoked by uid 89); 3 May 2013 12:57:37 -0000
X-Spam-SWARE-Status: No, score=-1.1 required=5.0 testsºYES_00,FREEMAIL_FROM,SPF_NEUTRAL autolearn=no version=3.3.1
Received: from slaygeal.uusia.org (HELO ip.uusia.org) (62.109.10.102) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Fri, 03 May 2013 12:57:34 +0000
Received: from [2a02:2560:6d4:26ca::1] (helo=waterlily.siamics.net) by ip.uusia.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from <oneingray@gmail.com>) id 1UYFYI-0008Pd-5g; Fri, 03 May 2013 12:57:30 +0000
Received: from violet.siamics.net ([2001:470:1f13:1eb::1:1d]) by waterlily.siamics.net with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from <oneingray@gmail.com>) id 1UYFYB-0007jE-Iu; Fri, 03 May 2013 19:57:23 +0700
Received: from localhost ([::1] helo=violet.siamics.net) by violet.siamics.net with esmtp (Exim 4.72) (envelope-from <oneingray@gmail.com>) id 1UYFYA-000491-Mm; Fri, 03 May 2013 19:57:22 +0700
From: Ivan Shmakov <oneingray@gmail.com>
To: bug-hurd@gnu.org, gdb-patches@sourceware.org
Cc: Ivan Shmakov <oneingray@gmail.com>
Subject: Re: [patch] for mig check in GDB's configure
References: <CAB8fV=gfGtguD28FGa-A5DZT8jqvEA1AoaK4dO=cHMQcCVvB-w@mail.gmail.com> <8738u4sc19.fsf@kepler.schwinge.homeip.net> <CAB8fV=hrvCmRd1AkMwvFsYZq1tCzgExWEfHLAURu6iWo3pTQ@mail.gmail.com>
Date: Fri, 03 May 2013 12:57:00 -0000
In-Reply-To: <CAB8fV=hrvCmRd1AkMwvFsYZq1tCzgExWEfHLAURu6iWo3pTQ@mail.gmail.com> (=?utf-8?B?IumZhuWysyIncw==?= message of "Fri, 3 May 2013 18:43:49 +0800")
Message-ID: <87txmkxlu6.fsf@violet.siamics.net>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-SW-Source: 2013-05/txt/msg00051.txt.bz2
Content-length: 2572

>>>>> é™†å²³ <hacklu.newborn@gmail.com> writes:

[…]

A few minor points.

> From 13d3edd1f6dbbc20b2801cea1fc367bf9042f977 Mon Sep 17 00:00:00 2001
> From: hacklu <hacklu.newborn@gmail.com>
> Date: Fri, 3 May 2013 18:27:08 +0800
> Subject: [PATCH] Patch check mig on GNU Hurd

> 2013-05-3 hacklu <hacklu.newborn@gmail.com>

There should be two spaces between the name and email, too. And
the date should be 2013-05-03, as per ISO 8601. (One may want
to check the respective Wikipedia article here.) As in, e. g.:

$ date -uI
2013-05-03
$

Also, I'd urge you to use the “realâ€ full name -- the same as
you'd use when filing a GSoC application, or copyright
assignment papers (as required by FSF), etc.

> * configure.ac : uncorrectly check for mig on GUN Hurd

• There should be no space before “:â€;

• the sentence should begin with a capital letter, and end with
a period;

• s/GUN/GNU/.

Besides, I'm having trouble understanding the intended meaning
of this sentence. Shouldn't it be, say, as follows instead?

* configure.ac: Ensure MIG is available when building for
GNU Hurd.

[…]

> --- a/gdb/ChangeLog
> +++ b/gdb/ChangeLog
> @@ -1,3 +1,7 @@
> +2013-05-3 hacklu <hacklu.newborn@gmail.com>
> +
> + * configure.ac : uncorrectly check for mig on GUN Hurd
> + * configure: Regenerate.
> 2013-04-30 Samuel Thibault <samuel.thibault@gnu.org>

The same applies here. Also, there should be an empty line
between the ChangeLog entries.

[…]

> --- a/gdb/configure.ac
> +++ b/gdb/configure.ac
> @@ -488,6 +488,15 @@ AC_CHECK_TOOL(WINDRES, windres)

> # Needed for GNU/Hurd.
> AC_CHECK_TOOL(MIG, mig)
> +case "${host}" in

Note that ‘{}’ are superfluous here; case "$host" will do the
same, but is a tiny bit shorter.

> + *-linux*|*-k*bsd-gnu*)
> + ;;
> + i[?]86-*-gnu*)
> + if test "$MIG" = "" ; then
> + AC_MSG_ERROR([MIG not found but required for $host])
> + fi
> + ;;

I guess that both cases should use the same indentation level —
either 4 spaces or 8 (or a TAB.) Check the rest of the GDB .ac
code for the currently preferred style.

Also, it's possible to avoid an indentation in the first case
altogether, like:

+ *-linux*|*-k*bsd-gnu*) ;;

Again, look at the rest of the GDB code and use a matching
style.

> +esac

[…]

--
FSF associate member #7257