2002-07-24 Dave Brolley <brolley@redhat.com>
authorDave Brolley <brolley@redhat.com>
Wed, 24 Jul 2002 15:25:03 +0000 (15:25 +0000)
committerDave Brolley <brolley@redhat.com>
Wed, 24 Jul 2002 15:25:03 +0000 (15:25 +0000)
* corefile.c (core_create_function_syms): Use the end of the section
containing the symbol to compute max_vma.

gprof/ChangeLog
gprof/corefile.c

index 1cbf37307e4de897a1e4ddb2820a8756824dd975..1d726d1e690195c4827a5a879618aa0cf1e178c1 100644 (file)
@@ -1,3 +1,8 @@
+2002-07-24  Dave Brolley  <brolley@redhat.com>
+
+       * corefile.c (core_create_function_syms): Use the end of the section
+       containing the symbol to compute max_vma.
+
 2002-07-24  Nick Clifton  <nickc@redhat.com>
 
        * po/sv.po: Updated Swedish translation.
index fdebc88fe632fdbc7280226b1655a775f3152038..74e78f5eec21005450277dea2bc2ef6c97231410 100644 (file)
@@ -542,8 +542,15 @@ core_create_function_syms (cbfd)
       if (class == 't')
        symtab.limit->is_static = true;
 
+      /* Keep track of the minimum and maximum vma addresses used by all
+        symbols.  When computing the max_vma, use the ending address of the
+        section containing the symbol, if available.  */
       min_vma = MIN (symtab.limit->addr, min_vma);
-      max_vma = MAX (symtab.limit->addr, max_vma);
+      if (core_syms[i]->section)
+       max_vma = MAX (core_syms[i]->section->vma
+                      + core_syms[i]->section->_cooked_size - 1, max_vma);
+      else
+       max_vma = MAX (symtab.limit->addr, max_vma);
 
       /* If we see "main" without an initial '_', we assume names
         are *not* prefixed by '_'.  */
This page took 0.027263 seconds and 4 git commands to generate.