This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Change trace buffer size(v5)
- From: Pedro Alves <palves at redhat dot com>
- To: "Abid, Hafiz" <hafiz_abid at mentor dot com>
- Cc: gdb-patches at sourceware dot org, stan at codesourcery dot com, yao at codesourcery dot com, eliz at gnu dot org
- Date: Fri, 08 Mar 2013 14:28:28 +0000
- Subject: Re: [patch] Change trace buffer size(v5)
- References: <1362742183.28338.0@abidh-ubunto1104>
On 03/08/2013 11:29 AM, Abid, Hafiz wrote:
> Hi Pedro,
>> It's always good for the submission to be explicit in these
>> things, and good to consider these issues upfront. I'm interested
>> in hearing your thoughts on the subject upfront, and the plans
>> you had, if any.
>>
>> I gave it some thought, and looked at the code to refresh a bit,
>> and I think things will still work correctly if the IPA buffer is
>> either smaller or larger than gdbserver's.
>>
>> Running the whole set of gdb.trace tests (--directory=gdb.trace)
>> with a gdbserver and IPA hacked to default to different
>> buffer sizes once would provide some assurance, though
>> not that much.
> I have run the test cases as you mentioned and did not see any
> regression.
Thanks.
> + sval = (LONGEST)val;
Space after cast.
> +
> +set BUFFER_SIZE 4
> +set default_size -1
> +
> +# Save default trace buffer size in 'default_size'.
Add:
set test "get default buffer size"
> +gdb_test_multiple "tstatus" "tstatus check 1" {
Make this:
gdb_test_multiple "tstatus" $test
> + -re ".*Trace buffer has ($decimal) bytes of ($decimal) bytes free.*" {
> + set default_size $expect_out(2,string)
Add:
pass $test
> + }
> +}
> +
> +# If we did not get the default size then there is no point in running the
> +# tests below.
> +if { $default_size < 0 } {
> + fail "Get default buffer size."
and remove this "fail" (watch for lowercase). gdb_test_multiple
will have already called FAIL with its second argument on failure.
> + return -1;
> +}
OK with these fixes.
Thanks,
--
Pedro Alves