|
From: <sv...@va...> - 2015-06-13 10:06:12
|
Author: florian
Date: Sat Jun 13 11:06:05 2015
New Revision: 15337
Log:
Remove VG_(am_next_nsegment) from external interface.
The internal organisation of the address space manager segments is now
completely hidden in the address space manager itself and it is invalid
for any AM users to assume a particular arrangement (e.g. array).
Modified:
branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-linux.c
branches/ASPACEM_TWEAKS/coregrind/pub_core_aspacemgr.h
Modified: branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-linux.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-linux.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-linux.c Sat Jun 13 11:06:05 2015
@@ -1120,7 +1120,7 @@
/* Find the next segment along from 'here', if it is a non-SkFree segment. */
-NSegment const * VG_(am_next_nsegment) ( const NSegment* here, Bool fwds )
+static const NSegment *next_nsegment ( const NSegment* here, Bool fwds )
{
const NSegment *next;
@@ -1278,7 +1278,7 @@
if (seg->smode != SmUpper) return False;
/* If the the abutting segment towards higher addresses is an SkAnonC
segment, then ADDR is a future stack pointer. */
- const NSegment *next = VG_(am_next_nsegment)(seg, /*forward*/ True);
+ const NSegment *next = next_nsegment(seg, /*forward*/ True);
if (next == NULL || next->kind != SkAnonC) return False;
/* OK; looks like a stack segment */
@@ -1289,7 +1289,7 @@
/* If the abutting segment towards lower addresses is an SkResvn
segment, then ADDR is a stack pointer into mapped memory. */
if (kind == MkUnmapped) return False;
- const NSegment *next = VG_(am_next_nsegment)(seg, /*forward*/ False);
+ const NSegment *next = next_nsegment(seg, /*forward*/ False);
if (next == NULL || next->kind != SkResvn || next->smode != SmUpper)
return False;
@@ -1329,7 +1329,7 @@
then this is OK. */
if (seg->smode != SmUpper) goto bad;
*start = seg->start;
- seg = VG_(am_next_nsegment)(seg, /*forward*/ True);
+ seg = next_nsegment(seg, /*forward*/ True);
if (!seg || seg->kind != SkAnonC || !seg->hasR || !seg->hasW) goto bad;
*end = seg->end;
return True;
@@ -3125,7 +3125,7 @@
return sres;
}
- const NSegment *anon_seg = VG_(am_next_nsegment)(seg, True/*fwds*/);
+ const NSegment *anon_seg = next_nsegment(seg, True/*fwds*/);
vg_assert(anon_seg != NULL);
udelta = VG_PGROUNDUP(anon_seg->start - addr);
Modified: branches/ASPACEM_TWEAKS/coregrind/pub_core_aspacemgr.h
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/pub_core_aspacemgr.h (original)
+++ branches/ASPACEM_TWEAKS/coregrind/pub_core_aspacemgr.h Sat Jun 13 11:06:05 2015
@@ -77,10 +77,6 @@
// Querying current status
-/* Find the next non-free segment along from 'here'. */
-extern NSegment const* VG_(am_next_nsegment) ( const NSegment* here,
- Bool fwds );
-
/* Is the area [start .. start+len-1] validly accessible by
valgrind with at least the permissions 'prot' ? To find out
simply if said area merely belongs to valgrind, pass
|