Split ada_val_print_1 into smaller functions
authorJoel Brobecker <brobecker@adacore.com>
Thu, 19 Dec 2013 12:30:43 +0000 (16:30 +0400)
committerJoel Brobecker <brobecker@adacore.com>
Tue, 7 Jan 2014 04:17:38 +0000 (08:17 +0400)
commit8004dfd1cf9caaf8a65236ebe6a4a4b3f544ab7a
tree2c7141e3ccbc02e17f4c31256ac8797cdd36c745
parent760a2db02f0d160c7990c52903bd9aaa796bd815
Split ada_val_print_1 into smaller functions

The idea of this patch is that it's hard to have a global view of
ada_val_print_1 because its body spans over too many lines. Also,
each individual "case" block within the giant "switch" can be hard
to isolate if spanning over multiple pages as well.

gdb/ChangeLog:

        * ada-valprint.c (ada_val_print_gnat_array): New function,
        extracted from ada_val_print_1;
        (ada_val_print_ptr, ada_val_print_num, ada_val_print_enum)
        (ada_val_print_flt, ada_val_print_struct_union)
        (ada_val_print_ref): Likewise.
        (ada_val_print_1): Delete variables i and elttype.
        Replace extracted-out code by call to corresponding
        new functions.
gdb/ChangeLog
gdb/ada-valprint.c