Index: /trunk/include/iprt/dbg.h
===================================================================
--- /trunk/include/iprt/dbg.h	(revision 75238)
+++ /trunk/include/iprt/dbg.h	(revision 75239)
@@ -674,7 +674,7 @@
  *          list.  These status codes will not necessarily be propagated to the
  *          caller in any consistent manner.
- * @retval  VINF_CALLBACK_RETURN if successuflly opened the file and it's time
+ * @retval  VINF_CALLBACK_RETURN if successfully opened the file and it's time
  *          to return
- * @retval  VERR_CALLBACK_RETURN if we shouldn't stop searching.
+ * @retval  VERR_CALLBACK_RETURN if we should stop searching immediately.
  *
  * @param   hDbgCfg             The debugging configuration handle.
@@ -688,4 +688,7 @@
 
 
+RTDECL(int) RTDbgCfgOpenEx(RTDBGCFG hDbgCfg, const char *pszFilename, const char *pszCacheSubDir,
+                           const char *pszUuidMappingSubDir, uint32_t fFlags,
+                           PFNRTDBGCFGOPEN pfnCallback, void *pvUser1, void *pvUser2);
 RTDECL(int) RTDbgCfgOpenPeImage(RTDBGCFG hDbgCfg, const char *pszFilename, uint32_t cbImage, uint32_t uTimestamp,
                                 PFNRTDBGCFGOPEN pfnCallback, void *pvUser1, void *pvUser2);
@@ -702,4 +705,26 @@
 RTDECL(int) RTDbgCfgOpenMachOImage(RTDBGCFG hDbgCfg, const char *pszFilename, PCRTUUID pUuid,
                                    PFNRTDBGCFGOPEN pfnCallback, void *pvUser1, void *pvUser2);
+
+/** @name RTDBGCFG_O_XXX - Open flags for RTDbgCfgOpen.
+ * @{ */
+/** The operative system mask.  The values are RT_OPSYS_XXX. */
+#define RTDBGCFG_O_OPSYS_MASK           UINT32_C(0x000000ff)
+/** Same as RTDBGCFG_FLAGS_NO_SYSTEM_PATHS. */
+#define RTDBGCFG_O_NO_SYSTEM_PATHS      RT_BIT_32(25)
+/** The files may be compressed MS styled. */
+#define RTDBGCFG_O_MAYBE_COMPRESSED_MS  RT_BIT_32(26)
+/** Whether to make a recursive search. */
+#define RTDBGCFG_O_RECURSIVE            RT_BIT_32(27)
+/** We're looking for a separate debug file. */
+#define RTDBGCFG_O_EXT_DEBUG_FILE       RT_BIT_32(28)
+/** We're looking for an executable image. */
+#define RTDBGCFG_O_EXECUTABLE_IMAGE     RT_BIT_32(29)
+/** The file search should be done in an case insensitive fashion. */
+#define RTDBGCFG_O_CASE_INSENSITIVE     RT_BIT_32(30)
+/** Use Windbg style symbol servers when encountered in the path. */
+#define RTDBGCFG_O_SYMSRV               RT_BIT_32(31)
+/** Mask of valid flags. */
+#define RTDBGCFG_O_VALID_MASK           UINT32_C(0xfe0000ff)
+/** @} */
 
 
@@ -1524,4 +1549,6 @@
  * @retval  VERR_DBG_ADDRESS_WRAP if off+cb wraps around.
  * @retval  VERR_INVALID_PARAMETER if the symbol flags sets undefined bits.
+ * @retval  VERR_DBG_DUPLICATE_SYMBOL
+ * @retval  VERR_DBG_ADDRESS_CONFLICT
  *
  * @param   hDbgMod         The module handle.
Index: /trunk/src/VBox/Runtime/common/dbg/dbgcfg.cpp
===================================================================
--- /trunk/src/VBox/Runtime/common/dbg/dbgcfg.cpp	(revision 75238)
+++ /trunk/src/VBox/Runtime/common/dbg/dbgcfg.cpp	(revision 75239)
@@ -131,23 +131,4 @@
 /** Pointer to a read only mnemonic map entry for a uint64_t property. */
 typedef RTDBGCFGU64MNEMONIC const *PCRTDBGCFGU64MNEMONIC;
-
-
-/** @name Open flags.
- * @{ */
-/** The operative system mask.  The values are RT_OPSYS_XXX. */
-#define RTDBGCFG_O_OPSYS_MASK           UINT32_C(0x000000ff)
-/** The files may be compressed MS styled. */
-#define RTDBGCFG_O_MAYBE_COMPRESSED_MS  RT_BIT_32(26)
-/** Whether to make a recursive search. */
-#define RTDBGCFG_O_RECURSIVE            RT_BIT_32(27)
-/** We're looking for a separate debug file. */
-#define RTDBGCFG_O_EXT_DEBUG_FILE       RT_BIT_32(28)
-/** We're looking for an executable image. */
-#define RTDBGCFG_O_EXECUTABLE_IMAGE     RT_BIT_32(29)
-/** The file search should be done in an case insensitive fashion. */
-#define RTDBGCFG_O_CASE_INSENSITIVE     RT_BIT_32(30)
-/** Use Windbg style symbol servers when encountered in the path. */
-#define RTDBGCFG_O_SYMSRV               RT_BIT_32(31)
-/** @} */
 
 
@@ -631,4 +612,5 @@
      */
     if (   (fFlags & RTDBGCFG_O_RECURSIVE)
+        && pThis
         && !(pThis->fFlags & RTDBGCFG_FLAGS_NO_RECURSIV_SEARCH) )
     {
@@ -746,4 +728,6 @@
         return VWRN_NOT_FOUND;
     if (!pszCacheSubDir || !*pszCacheSubDir)
+        return VWRN_NOT_FOUND;
+    if (!(fFlags & RTDBGCFG_O_SYMSRV))
         return VWRN_NOT_FOUND;
 
@@ -1207,4 +1191,5 @@
     AssertPtrReturn(pszCacheSubDir, VERR_INVALID_POINTER);
     AssertPtrReturn(pfnCallback, VERR_INVALID_POINTER);
+    AssertReturn(!(fFlags & ~RTDBGCFG_O_VALID_MASK), VERR_INVALID_FLAGS);
 
     /*
@@ -1212,8 +1197,8 @@
      * it's case exact or not.
      */
-    bool fDosPath = strchr(pszFilename, ':')  != NULL
-                 || strchr(pszFilename, '\\') != NULL
-                 || RT_OPSYS_USES_DOS_PATHS(fFlags & RTDBGCFG_O_OPSYS_MASK)
-                 || (fFlags & RTDBGCFG_O_CASE_INSENSITIVE);
+    bool fDosPath = RT_OPSYS_USES_DOS_PATHS(fFlags & RTDBGCFG_O_OPSYS_MASK)
+                 || (fFlags & RTDBGCFG_O_CASE_INSENSITIVE)
+                 || strchr(pszFilename, ':')  != NULL
+                 || strchr(pszFilename, '\\') != NULL;
     if (fDosPath)
         fFlags |= RTDBGCFG_O_CASE_INSENSITIVE;
@@ -1282,4 +1267,5 @@
                     && rc2 != VERR_CALLBACK_RETURN
                     && (fFlags & RTDBGCFG_O_EXECUTABLE_IMAGE)
+                    && !(fFlags & RTDBGCFG_O_NO_SYSTEM_PATHS)
                     && !(pThis->fFlags & RTDBGCFG_FLAGS_NO_SYSTEM_PATHS) )
                 {
@@ -1292,4 +1278,5 @@
                 if (   rc2 != VINF_CALLBACK_RETURN
                     && rc2 != VERR_CALLBACK_RETURN
+                    && !(fFlags & RTDBGCFG_O_NO_SYSTEM_PATHS)
                     && !(pThis->fFlags & RTDBGCFG_FLAGS_NO_SYSTEM_PATHS) )
                 {
@@ -1315,4 +1302,15 @@
     return rcRet;
 }
+
+
+RTDECL(int) RTDbgCfgOpenEx(RTDBGCFG hDbgCfg, const char *pszFilename, const char *pszCacheSubDir,
+                           const char *pszUuidMappingSubDir, uint32_t fFlags,
+                           PFNRTDBGCFGOPEN pfnCallback, void *pvUser1, void *pvUser2)
+{
+    return rtDbgCfgOpenWithSubDir(hDbgCfg, pszFilename, pszCacheSubDir, pszUuidMappingSubDir, fFlags,
+                                  pfnCallback, pvUser1, pvUser2);
+}
+
+
 
 
@@ -1917,4 +1915,5 @@
         rtDbgCfgFreeStrList(pList);
 
+    PRTLISTNODE pPrependTo = pList;
     while (*pszValue)
     {
@@ -1965,5 +1964,8 @@
 
             if (enmOp == RTDBGCFGOP_PREPEND)
-                RTListPrepend(pList, &pNew->ListEntry);
+            {
+                RTListNodeInsertAfter(pPrependTo, &pNew->ListEntry);
+                pPrependTo = &pNew->ListEntry;
+            }
             else
                 RTListAppend(pList, &pNew->ListEntry);
