]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
search_all_symtabs: when mapping addresses to text symbols, consider
authorJulian Seward <jseward@acm.org>
Mon, 12 Apr 2010 20:56:56 +0000 (20:56 +0000)
committerJulian Seward <jseward@acm.org>
Mon, 12 Apr 2010 20:56:56 +0000 (20:56 +0000)
any symbol in the r-x mapped segment to be a valid candidate.  This
relaxes the filtering criterion slightly, makes it consistent with
other is-it-text? checks.  Some addresses which before didn't get
mapped to anything are now correctly mapped to "vtable for Foo"
symbols.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11104

coregrind/m_debuginfo/debuginfo.c

index 2056ec2ab45f55797b21d56b319a0069491affcd..9bb3d8d85495b83755e03f41070050c9738e45ae 100644 (file)
@@ -1239,10 +1239,13 @@ static void search_all_symtabs ( Addr ptr, /*OUT*/DebugInfo** pdi,
    for (di = debugInfo_list; di != NULL; di = di->next) {
 
       if (findText) {
-         inRange = di->text_present
-                   && di->text_size > 0
-                   && di->text_avma <= ptr 
-                   && ptr < di->text_avma + di->text_size;
+         /* Consider any symbol in the r-x mapped area to be text.
+            See Comment_Regarding_Text_Range_Checks in storage.c for
+            details. */
+         inRange = di->have_rx_map
+                   && di->rx_map_size > 0
+                   && di->rx_map_avma <= ptr
+                   && ptr < di->rx_map_avma + di->rx_map_size;
       } else {
          inRange = (di->data_present
                     && di->data_size > 0