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 Fix year range in unittests/.../char/empty.cc copyright header 2019-01-02 10:11:41 +04:00
optional Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
array-view-selftests.c Rename common to gdbsupport 2019-07-09 07:45:38 -06:00
child-path-selftests.c Rename common to gdbsupport 2019-07-09 07:45:38 -06:00
cli-utils-selftests.c Rename common to gdbsupport 2019-07-09 07:45:38 -06:00
common-utils-selftests.c Rename common to gdbsupport 2019-07-09 07:45:38 -06:00
copy_bitwise-selftests.c Rename common to gdbsupport 2019-07-09 07:45:38 -06:00
environ-selftests.c Rename common to gdbsupport 2019-07-09 07:45:38 -06:00
format_pieces-selftests.c Handle %I64d in format_pieces 2019-11-21 14:39:40 -07:00
function-view-selftests.c Rename common to gdbsupport 2019-07-09 07:45:38 -06:00
help-doc-selftests.c Add a selftest that checks documentation invariants. 2019-08-07 00:05:34 +02:00
lookup_name_info-selftests.c Rename common to gdbsupport 2019-07-09 07:45:38 -06:00
memory-map-selftests.c Rename common to gdbsupport 2019-07-09 07:45:38 -06:00
memrange-selftests.c Rename common to gdbsupport 2019-07-09 07:45:38 -06:00
mkdir-recursive-selftests.c Rename common to gdbsupport 2019-07-09 07:45:38 -06:00
observable-selftests.c Rename common to gdbsupport 2019-07-09 07:45:38 -06:00
offset-type-selftests.c Rename common to gdbsupport 2019-07-09 07:45:38 -06:00
optional-selftests.c Rename common to gdbsupport 2019-07-09 07:45:38 -06:00
parse-connection-spec-selftests.c Rename common to gdbsupport 2019-07-09 07:45:38 -06:00
ptid-selftests.c Rename common to gdbsupport 2019-07-09 07:45:38 -06:00
rsp-low-selftests.c [gdb] Fix more typos in comments (2) 2019-10-26 09:55:32 +02:00
scoped_fd-selftests.c Rename common to gdbsupport 2019-07-09 07:45:38 -06:00
scoped_mmap-selftests.c Rename common to gdbsupport 2019-07-09 07:45:38 -06:00
scoped_restore-selftests.c Rename common to gdbsupport 2019-07-09 07:45:38 -06:00
string_view-selftests.c Rename common to gdbsupport 2019-07-09 07:45:38 -06:00
style-selftests.c Rename common to gdbsupport 2019-07-09 07:45:38 -06:00
tracepoint-selftests.c Rename common to gdbsupport 2019-07-09 07:45:38 -06:00
unpack-selftests.c Rename common to gdbsupport 2019-07-09 07:45:38 -06:00
utils-selftests.c Rename common to gdbsupport 2019-07-09 07:45:38 -06:00
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 Rename common to gdbsupport 2019-07-09 07:45:38 -06:00