]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Print section type and name as a last resort in case the other allocation context...
authorBart Van Assche <bvanassche@acm.org>
Wed, 9 Jul 2008 12:43:35 +0000 (12:43 +0000)
committerBart Van Assche <bvanassche@acm.org>
Wed, 9 Jul 2008 12:43:35 +0000 (12:43 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8409

drd/drd_error.c

index 4c60c069f0f08723fc0bf91010e1ed456361f029..a8c0052af40f6aba75ccf6e669bf6c1ccaba759e 100644 (file)
@@ -134,7 +134,21 @@ void drd_report_data_race2(Error* const err, const DataRaceErrInfo* const dri)
   }
   else
   {
-    VG_(message)(Vg_UserMsg, "Allocation context: unknown.");
+    char sect_name[64];
+    VgSectKind sect_kind;
+
+    sect_kind = VG_(seginfo_sect_kind)(sect_name, sizeof(sect_name), dri->addr);
+    if (sect_kind != Vg_SectUnknown)
+    {
+      VG_(message)(Vg_UserMsg,
+                   "Allocation context: %s section of %s",
+                   VG_(pp_SectKind)(sect_kind),
+                   sect_name);
+    }
+    else
+    {
+      VG_(message)(Vg_UserMsg, "Allocation context: unknown.");
+    }
   }
   if (s_drd_show_conflicting_segments)
   {