Made m_debuginfo not depend on m_aspacemgr, breaking the direct circular
dependence between them.  (There's still an indirect one via m_libcmman.)

As a result, I was able to move the Segment type declaration into
pub_core_aspacemgr.h, which is a much better spot.  I was also able to
remove a couple of #includes.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4025 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/m_aspacemgr/aspacemgr.c b/coregrind/m_aspacemgr/aspacemgr.c
index 9cc3ea4..64745c6 100644
--- a/coregrind/m_aspacemgr/aspacemgr.c
+++ b/coregrind/m_aspacemgr/aspacemgr.c
@@ -792,13 +792,16 @@
        && ( (addr+len < VG_(valgrind_base) || addr > VG_(valgrind_last))
             || is_stage2
           )
-       && (flags & (SF_MMAP|SF_NOSYMS)) == SF_MMAP) {
+       && (flags & (SF_MMAP|SF_NOSYMS)) == SF_MMAP
+   ) {
       if (off == 0
 	  && s->fnIdx != -1
 	  && (prot & (VKI_PROT_READ|VKI_PROT_EXEC)) == (VKI_PROT_READ|VKI_PROT_EXEC)
 	  && len >= VKI_PAGE_SIZE
-          && VG_(is_object_file)((void *)addr)) {
-         s->seginfo = VG_(read_seg_symbols)(s);
+          && VG_(is_object_file)((void *)addr)
+      ) {
+         s->seginfo = VG_(read_seg_symbols)(s->addr, s->len, s->offset,
+                                            s->filename);
          if (s->seginfo != NULL) {
             s->flags |= SF_DYNLIB;
          }