Translations are allowed from all client segments. Update comments
and rename VG_(am_set_segment_hasT_if_SkFileC_or_SkAnonC) to
VG_(am_set_segment_hasT_if_client_segment). Change it so it handles
all client segments.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14936 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/m_aspacemgr/aspacemgr-linux.c b/coregrind/m_aspacemgr/aspacemgr-linux.c
index 6ab1044..04611ff 100644
--- a/coregrind/m_aspacemgr/aspacemgr-linux.c
+++ b/coregrind/m_aspacemgr/aspacemgr-linux.c
@@ -2710,13 +2710,14 @@
}
/* Same idea as VG_(am_set_segment_isCH_if_SkAnonC), except set the
- segment's hasT bit (has-cached-code) if this is SkFileC or SkAnonC
- segment. */
-void VG_(am_set_segment_hasT_if_SkFileC_or_SkAnonC)( const NSegment* seg )
+ segment's hasT bit (has-cached-code) if this is a client segment,
+ i.e. SkFileC, SkAnonC, or SkShmC. */
+void VG_(am_set_segment_hasT_if_client_segment)( const NSegment* seg )
{
aspacem_assert(seg != NULL);
Int i = segAddr_to_index( seg );
- if (nsegments[i].kind == SkAnonC || nsegments[i].kind == SkFileC) {
+ if (nsegments[i].kind == SkAnonC || nsegments[i].kind == SkFileC ||
+ nsegments[i].kind == SkShmC) {
nsegments[i].hasT = True;
}
}
diff --git a/coregrind/m_translate.c b/coregrind/m_translate.c
index 8eb85b0..3ae779a 100644
--- a/coregrind/m_translate.c
+++ b/coregrind/m_translate.c
@@ -1772,14 +1772,14 @@
vg_assert( vge.base[0] == addr );
/* set 'translations taken from this segment' flag */
- VG_(am_set_segment_hasT_if_SkFileC_or_SkAnonC)( seg );
+ VG_(am_set_segment_hasT_if_client_segment)( seg );
} /* END new scope specially for 'seg' */
for (i = 1; i < vge.n_used; i++) {
NSegment const* seg
= VG_(am_find_nsegment)( vge.base[i] );
/* set 'translations taken from this segment' flag */
- VG_(am_set_segment_hasT_if_SkFileC_or_SkAnonC)( seg );
+ VG_(am_set_segment_hasT_if_client_segment)( seg );
}
/* Copy data at trans_addr into the translation cache. */
diff --git a/coregrind/pub_core_aspacemgr.h b/coregrind/pub_core_aspacemgr.h
index aec6add..915c37a 100644
--- a/coregrind/pub_core_aspacemgr.h
+++ b/coregrind/pub_core_aspacemgr.h
@@ -254,9 +254,9 @@
extern void VG_(am_set_segment_isCH_if_SkAnonC)( const NSegment* seg );
/* Same idea as VG_(am_set_segment_isCH_if_SkAnonC), except set the
- segment's hasT bit (has-cached-code) if this is SkFileC or SkAnonC
- segment. */
-extern void VG_(am_set_segment_hasT_if_SkFileC_or_SkAnonC)( const NSegment* );
+ segment's hasT bit (has-cached-code) if this is a client segment,
+ i.e. SkFileC, SkAnonC, or SkShmC. */
+extern void VG_(am_set_segment_hasT_if_client_segment)( const NSegment* );
/* --- --- --- reservations --- --- --- */
diff --git a/include/pub_tool_aspacemgr.h b/include/pub_tool_aspacemgr.h
index e486526..5edcb03 100644
--- a/include/pub_tool_aspacemgr.h
+++ b/include/pub_tool_aspacemgr.h
@@ -87,7 +87,7 @@
// segment has no permissions
hasR==hasW==hasX == False
- Also: hasT==True is only allowed in SkFileC and SkAnonC
+ Also: hasT==True is only allowed in SkFileC, SkAnonC, and SkShmC
(viz, not allowed to make translations from non-client areas)
*/
typedef