delete ada-lang.c::move_bits, sharing and re-using copy_bitwise instead
This patch deletes ada-lang.c's move_bits function entirely, and
replaces all calls to it by calls to copy_bitwise instead. Because
the latter function was declared locally inside dwarf2loc.c, this
patch also move the function to a common area, and makes it non-static.
gdb/ChangeLog:
* ada-lang.c (move_bits): Delete. Update all callers to use
copy_bitwise instead.
* dwarf2loc.c (copy_bitwise, bits_to_str::bits_to_str)
(selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
Move from here to utils.c.
(_initialize_dwarf2loc): Remove call to register copy_bitwise
selftests.
* utils.h (copy_bitwise): Add declaration.
* utils.c (copy_bitwise, bits_to_str::bits_to_str)
(selftests::check_copy_bitwise, selftests::copy_bitwise_tests):
Moved here from dwarf2loc.c.
(_initialize_utils): Register copy_bitwise selftests.
Tested on x86_64-linux, no regression. Also tested using AdaCore's
testsuite on a collection of small endian and big endian platforms.