From 074319087452e3a8b1a0e84279a82555dd798d69 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Tue, 14 Nov 2017 16:42:08 -0500 Subject: Fix mem region parsing regression and add test In my patch Get rid of VEC (mem_region) a664f67e50eff30198097d51cec0ec4690abb2a1 I introduced a regression, where the length of the memory region is assigned to the "hi" field. It should obviously be computed as "start + length". To my defense, no test had caught this :). As a penance, I wrote one. gdb/ChangeLog: * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add memory-map-selftests.c. (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o. * memory-map.c (memory_map_start_memory): Fix computation of hi address. * unittests/memory-map-selftests.c: New file. --- gdb/Makefile.in | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gdb/Makefile.in') diff --git a/gdb/Makefile.in b/gdb/Makefile.in index 5e01816..a3bfbf9 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -531,6 +531,7 @@ SUBDIR_UNITTESTS_SRCS = \ unittests/environ-selftests.c \ unittests/function-view-selftests.c \ unittests/lookup_name_info-selftests.c \ + unittests/memory-map-selftests.c \ unittests/memrange-selftests.c \ unittests/offset-type-selftests.c \ unittests/optional-selftests.c \ @@ -544,6 +545,7 @@ SUBDIR_UNITTESTS_OBS = \ environ-selftests.o \ function-view-selftests.o \ lookup_name_info-selftests.o \ + memory-map-selftests.o \ memrange-selftests.o \ offset-type-selftests.o \ optional-selftests.o \ -- cgit v1.1