Add unit test for copy_bitwise

This adds a unit test for the copy_bitwise function in dwarf2loc.c.
With the old (broken) version of copy_bitwise this test would generate
the following failure message:

(gdb) maintenance selftest
Self test failed: copy_bitwise 11000000 != 10000000 (7+2 -> 0)

gdb/ChangeLog:
2016-11-24  Andreas Arnez  <arnez@linux.vnet.ibm.com>
	    Pedro Alves  <palves@redhat.com>

	* dwarf2loc.c (bits_to_str, check_copy_bitwise)
	(copy_bitwise_tests): New functions.
	(_initialize_dwarf2loc): Register the new function
	copy_bitwise_tests as a unit test.
	* selftest.c (run_self_tests): Improve the failure message's
	wording and formatting.
3 files changed