binutils-gdb/gdb/unittests
Tom Tromey 6ba1852136 Handle %I64d in format_pieces
We found a bug internally where gdb would crash while disassembling a
certain instruction.  This was tracked down to the handling of %I64d
in format_pieces.

format_pieces will convert %ll to %I64d on mingw -- so format_pieces
should also handle parsing this format.  In this patch, I've made the
parsing unconditional, since I think it is harmless to accept extra
formats.  I've also taken the opportunity to convert the length
modifier test to a "switch".

Tested internally using our failing test case.

gdb/ChangeLog
2019-11-21  Tom Tromey  <tromey@adacore.com>

	* gdbsupport/format.c (format_pieces): Parse %I64d.
	* unittests/format_pieces-selftests.c (test_windows_formats): New
	function.
	(run_tests): Call it.

Change-Id: If335c7c2fc8d01e629cd55182394a483334d79c7
2019-11-21 14:39:40 -07:00
..
basic_string_view
optional
array-view-selftests.c
child-path-selftests.c
cli-utils-selftests.c
common-utils-selftests.c
copy_bitwise-selftests.c
environ-selftests.c
format_pieces-selftests.c Handle %I64d in format_pieces 2019-11-21 14:39:40 -07:00
function-view-selftests.c
help-doc-selftests.c
lookup_name_info-selftests.c
memory-map-selftests.c
memrange-selftests.c
mkdir-recursive-selftests.c
observable-selftests.c
offset-type-selftests.c
optional-selftests.c
parse-connection-spec-selftests.c
ptid-selftests.c
rsp-low-selftests.c
scoped_fd-selftests.c
scoped_mmap-selftests.c
scoped_restore-selftests.c
string_view-selftests.c
style-selftests.c
tracepoint-selftests.c
unpack-selftests.c
utils-selftests.c
vec-utils-selftests.c gdb: fix build error in unittests/vec-utils-selftests.c 2019-11-14 06:51:30 -05:00
xml-utils-selftests.c