[Ada] split data unpacking code out of ada_value_primitive_packed_val.
authorJoel Brobecker <brobecker@adacore.com>
Fri, 9 Oct 2015 21:12:51 +0000 (14:12 -0700)
committerJoel Brobecker <brobecker@adacore.com>
Fri, 9 Oct 2015 21:30:06 +0000 (14:30 -0700)
commitf93fca700f0fd70532132ae535f48c1a936abb0a
tree54b5f5349f109a56079fcb4180227ef9ce280da0
parenta1c95e6b6ede168770664cdca8ae1568187554b4
[Ada] split data unpacking code out of ada_value_primitive_packed_val.

This patch is just preparation work which splits the function
ada_value_primitive_packed_val into two function: one which unpacks
the data, and the other which now uses it to implement
ada_value_primitive_packed_val.

This simplifies a bit ada_value_primitive_packed_val, but will also
allow us to use the new function to unpack data without actually creating
a struct value as a result.

gdb/ChangeLog:

        * ada-lang.c (ada_unpack_from_contents): New function,
        extracted from ada_value_primitive_packed_val.
        (ada_value_primitive_packed_val): Replace extracted out code
        by call to ada_unpack_from_contents.
gdb/ChangeLog
gdb/ada-lang.c