This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]