summaryrefslogtreecommitdiffstats
path: root/vm/Misc.h
diff options
context:
space:
mode:
Diffstat (limited to 'vm/Misc.h')
-rw-r--r--vm/Misc.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/vm/Misc.h b/vm/Misc.h
index e188705c2..ec364d7b9 100644
--- a/vm/Misc.h
+++ b/vm/Misc.h
@@ -316,4 +316,23 @@ typedef struct {
} ProcStatData;
bool dvmGetThreadStats(ProcStatData* pData, pid_t tid);
+/*
+ * Returns the pointer to the "absolute path" part of the given path
+ * string, treating first (if any) instance of "/./" as a sentinel
+ * indicating the start of the absolute path. If the path isn't absolute
+ * in the usual way (i.e., starts with "/") and doesn't have the sentinel,
+ * then this returns NULL.
+ *
+ * For example:
+ * "/foo/bar/baz" returns "/foo/bar/baz"
+ * "foo/./bar/baz" returns "/bar/baz"
+ * "foo/bar/baz" returns NULL
+ *
+ * The sentinel is used specifically to aid in cross-optimization, where
+ * a host is processing dex files in a build tree, and where we don't want
+ * the build tree's directory structure to be baked into the output (such
+ * as, for example, in the dependency paths of optimized dex files).
+ */
+const char* dvmPathToAbsolutePortion(const char* path);
+
#endif /*_DALVIK_MISC*/