It's a bit of a special case, because we don't have a pointer DIE for
the named type in @cast expressions. However, we can read the element
size manually and still simulate an array access.
* loc2c.c (pointer_stride): New, factored out of array_stride.
(c_translate_array_pointer): New, performs the pointer math based on
the element size of the pointee type.
* dwflpp.cxx (dwflpp::translate_components): Take a starting component.
(dwflpp::literal_stmt_for_pointer): If the initial type is not already
a pointer or array, we can fake an array access on the input pointer.
* testsuite/semok/cast.stp: Add an array access test on a @cast.
* testsuite/systemtap.base/cast.stp: Ditto.
* testsuite/systemtap.base/cast.exp: Ditto.