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 v5 11/15] test: cover subranges with present DW_AT_count attribute


On Thu, Feb 06, 2014 at 05:27:32PM +0100, Sanimir Agovic wrote:
> The dwarf attribute DW_AT_count specifies the elements of a subrange.
> This test covers subranges with present count but absent upper bound
> attribute, both with static and dynamic attribute values.
> 
> 2013-11-26  Sanimir Agovic  <sanimir.agovic@intel.com>
>             Keven Boell  <keven.boell@intel.com>
> 
> testsuite:
> 	* gdb.dwarf2/count.exp: New test.

One small comment.  Pre-approved with those changes made.

> +gdb_test "ptype array" "type = char \\\[5\\\]" "ptype array"
> +gdb_test "whatis array" "type = char \\\[5\\\]" "whatis array"
> +gdb_test "print array" "\"hello\"" "print array"
> +gdb_test "print sizeof array" "5" "print sizeof array"
> +
> +gdb_test "ptype static_array" "type = char \\\[5\\\]" "ptype static_array"
> +gdb_test "whatis static_array" "type = char \\\[5\\\]" "whatis static_array"
> +gdb_test "print static_array" "\"world\"" "print static_array"
> +gdb_test "print sizeof static_array" "5" "print sizeof static_array"

In the 4 "print" tests, can you start the expected output by
" = "? In particular for the sizeof tests, it'll make sure that
you don't match a bogus return value that happens to contain
a 5 in it.

-- 
Joel


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