[PATCH] Allow printing of 64-bit array sizes in C

Siddhesh Poyarekar siddhesh@redhat.com
Mon Sep 24 11:22:00 GMT 2012


Hi,

The bitpos expansion patch[1] also included a fix to allow printing of
64-bit array sizes in C.  I have now separated out this portion of the
patch since it is a separate problem and can be fixed independently of
the struct/offset expansion.

I have also included a test case with this.  I have put the array whose
size I intend to test inside a struct so that I can use this same test
case for the bitpos test and renamed the test case accordingly.  The
test passes with this patch (and not without it).  I have also verified
on F-16 x86_64 that I do not see any regressions resulting from the
fix.  OK to commit?

Regards,
Siddhesh

[1] http://sourceware.org/ml/gdb-patches/2012-08/msg00144.html

gdb/ChangeLog:

	* c-typeprint.c (c_type_print_varspec_suffix): Remove cast and
	use plongest to print the array size.

testsuite/ChangeLog:

	* gdb.base/longest-types.patch.c: New test case.
	* gdb.base/longest-types.patch.c: New test case.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: array-size.patch
Type: text/x-patch
Size: 2784 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20120924/c3d14ffd/attachment.bin>


More information about the Gdb-patches mailing list