Include pub_core_aspacemgr.h only where needed.
Also fixes BZ #344235.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14966 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/NEWS b/NEWS
index 2d38e3d..e3606c2 100644
--- a/NEWS
+++ b/NEWS
@@ -101,6 +101,7 @@
 343967  Don't warn about setuid/setgid/setcap executable for directories
 343978  Recognize DWARF5/GCC5 DW_LANG_Fortran 2003 and 2008 constants
 344007  accept4 syscall unhandled on arm64 (242) and ppc64 (344)
+344235  Remove duplicate include of pub_core_aspacemgr.h
 344279  syscall sendmmsg on arm64 (269) and ppc32/64 (349) unhandled
 344295  syscall recvmmsg on arm64 (243) and ppc32/64 (343) unhandled
 344307  2 unhandled syscalls on aarch64/arm64: umount2(39), mount (40)
diff --git a/coregrind/m_addrinfo.c b/coregrind/m_addrinfo.c
index 0be0566..9aa0047 100644
--- a/coregrind/m_addrinfo.c
+++ b/coregrind/m_addrinfo.c
@@ -37,7 +37,6 @@
 #include "pub_core_xarray.h"
 #include "pub_core_debuginfo.h"
 #include "pub_core_execontext.h"
-#include "pub_core_aspacemgr.h"
 #include "pub_core_addrinfo.h"
 #include "pub_core_mallocfree.h"
 #include "pub_core_machine.h"
diff --git a/coregrind/m_gdbserver/remote-utils.c b/coregrind/m_gdbserver/remote-utils.c
index a633c2b..f79c923 100644
--- a/coregrind/m_gdbserver/remote-utils.c
+++ b/coregrind/m_gdbserver/remote-utils.c
@@ -26,6 +26,7 @@
 #include "pub_core_vkiscnums.h"
 #include "pub_core_libcsignal.h"
 #include "pub_core_options.h"
+#include "pub_core_aspacemgr.h"
 
 #include "server.h"
 
diff --git a/coregrind/m_gdbserver/server.c b/coregrind/m_gdbserver/server.c
index 85242f1..9aae3a3 100644
--- a/coregrind/m_gdbserver/server.c
+++ b/coregrind/m_gdbserver/server.c
@@ -33,6 +33,7 @@
 #include "pub_core_transtab.h"
 #include "pub_core_debuginfo.h"
 #include "pub_core_addrinfo.h"
+#include "pub_core_aspacemgr.h"
 
 unsigned long cont_thread;
 unsigned long general_thread;
diff --git a/coregrind/m_gdbserver/server.h b/coregrind/m_gdbserver/server.h
index 39e42a2..1e010ca 100644
--- a/coregrind/m_gdbserver/server.h
+++ b/coregrind/m_gdbserver/server.h
@@ -43,7 +43,6 @@
 #include "pub_core_libcsetjmp.h"
 #include "pub_core_threadstate.h"
 #include "pub_core_gdbserver.h"
-#include "pub_core_aspacemgr.h"
 #include "pub_core_vki.h"
 #include "pub_core_clreq.h"
 
diff --git a/coregrind/m_gdbserver/valgrind-low-amd64.c b/coregrind/m_gdbserver/valgrind-low-amd64.c
index 630a3b0..c0d85bf 100644
--- a/coregrind/m_gdbserver/valgrind-low-amd64.c
+++ b/coregrind/m_gdbserver/valgrind-low-amd64.c
@@ -26,7 +26,6 @@
 #include "regdef.h"
 #include "regcache.h"
 
-#include "pub_core_aspacemgr.h"
 #include "pub_core_machine.h"
 #include "pub_core_threadstate.h"
 #include "pub_core_transtab.h"
diff --git a/coregrind/m_gdbserver/valgrind-low-arm.c b/coregrind/m_gdbserver/valgrind-low-arm.c
index be2be8a..c6f33aa 100644
--- a/coregrind/m_gdbserver/valgrind-low-arm.c
+++ b/coregrind/m_gdbserver/valgrind-low-arm.c
@@ -26,7 +26,6 @@
 #include "regdef.h"
 #include "regcache.h"
 
-#include "pub_core_aspacemgr.h"
 #include "pub_core_machine.h"
 #include "pub_core_threadstate.h"
 #include "pub_core_transtab.h"
diff --git a/coregrind/m_gdbserver/valgrind-low-arm64.c b/coregrind/m_gdbserver/valgrind-low-arm64.c
index 14d3362..17aa206 100644
--- a/coregrind/m_gdbserver/valgrind-low-arm64.c
+++ b/coregrind/m_gdbserver/valgrind-low-arm64.c
@@ -26,7 +26,6 @@
 #include "regdef.h"
 #include "regcache.h"
 
-#include "pub_core_aspacemgr.h"
 #include "pub_core_machine.h"
 #include "pub_core_threadstate.h"
 #include "pub_core_transtab.h"
diff --git a/coregrind/m_gdbserver/valgrind-low-mips32.c b/coregrind/m_gdbserver/valgrind-low-mips32.c
index 91b4086..e44b635 100644
--- a/coregrind/m_gdbserver/valgrind-low-mips32.c
+++ b/coregrind/m_gdbserver/valgrind-low-mips32.c
@@ -26,7 +26,6 @@
 #include "regdef.h"
 #include "regcache.h"
 
-#include "pub_core_aspacemgr.h"
 #include "pub_core_machine.h"
 #include "pub_core_debuginfo.h"
 #include "pub_core_threadstate.h"
diff --git a/coregrind/m_gdbserver/valgrind-low-mips64.c b/coregrind/m_gdbserver/valgrind-low-mips64.c
index 75be5dd..f02bef7 100644
--- a/coregrind/m_gdbserver/valgrind-low-mips64.c
+++ b/coregrind/m_gdbserver/valgrind-low-mips64.c
@@ -26,7 +26,6 @@
 #include "regdef.h"
 #include "regcache.h"
 
-#include "pub_core_aspacemgr.h"
 #include "pub_core_machine.h"
 #include "pub_core_debuginfo.h"
 #include "pub_core_threadstate.h"
diff --git a/coregrind/m_gdbserver/valgrind-low-ppc32.c b/coregrind/m_gdbserver/valgrind-low-ppc32.c
index 87e6072..db5d8ce 100644
--- a/coregrind/m_gdbserver/valgrind-low-ppc32.c
+++ b/coregrind/m_gdbserver/valgrind-low-ppc32.c
@@ -26,7 +26,6 @@
 #include "regdef.h"
 #include "regcache.h"
 
-#include "pub_core_aspacemgr.h"
 #include "pub_core_machine.h"
 #include "pub_core_threadstate.h"
 #include "pub_core_transtab.h"
diff --git a/coregrind/m_gdbserver/valgrind-low-ppc64.c b/coregrind/m_gdbserver/valgrind-low-ppc64.c
index 349c9bb..3bf90b1 100644
--- a/coregrind/m_gdbserver/valgrind-low-ppc64.c
+++ b/coregrind/m_gdbserver/valgrind-low-ppc64.c
@@ -26,7 +26,6 @@
 #include "regdef.h"
 #include "regcache.h"
 
-#include "pub_core_aspacemgr.h"
 #include "pub_core_machine.h"
 #include "pub_core_threadstate.h"
 #include "pub_core_transtab.h"
diff --git a/coregrind/m_gdbserver/valgrind-low-s390x.c b/coregrind/m_gdbserver/valgrind-low-s390x.c
index 3a963be..3985b09 100644
--- a/coregrind/m_gdbserver/valgrind-low-s390x.c
+++ b/coregrind/m_gdbserver/valgrind-low-s390x.c
@@ -26,7 +26,6 @@
 #include "regdef.h"
 #include "regcache.h"
 
-#include "pub_core_aspacemgr.h"
 #include "pub_core_machine.h"
 #include "pub_core_threadstate.h"
 #include "pub_core_transtab.h"
diff --git a/coregrind/m_gdbserver/valgrind-low-x86.c b/coregrind/m_gdbserver/valgrind-low-x86.c
index ffe124b..410c425 100644
--- a/coregrind/m_gdbserver/valgrind-low-x86.c
+++ b/coregrind/m_gdbserver/valgrind-low-x86.c
@@ -26,7 +26,6 @@
 #include "regdef.h"
 #include "regcache.h"
 
-#include "pub_core_aspacemgr.h"
 #include "pub_core_machine.h"
 #include "pub_core_threadstate.h"
 #include "pub_core_transtab.h"
diff --git a/include/pub_tool_addrinfo.h b/include/pub_tool_addrinfo.h
index 3b1c45f..d62bc34 100644
--- a/include/pub_tool_addrinfo.h
+++ b/include/pub_tool_addrinfo.h
@@ -32,6 +32,7 @@
 #define __PUB_TOOL_ADDRINFO_H
 
 #include "pub_tool_basics.h"   // VG_ macro
+#include "pub_tool_aspacemgr.h"  // SegKind
 
 /*====================================================================*/
 /*=== Obtaining information about an address                       ===*/