Index: trunk/include/iprt/dbg.h
===================================================================
--- trunk/include/iprt/dbg.h	(revision 41492)
+++ trunk/include/iprt/dbg.h	(revision 41493)
@@ -60,4 +60,16 @@
 /** The last valid special segment index. */
 #define RTDBGSEGIDX_SPECIAL_FIRST   (RTDBGSEGIDX_LAST + 1U)
+
+
+/** @name RTDBGSYMADDR_FLAGS_XXX
+ * Flags used when looking up a symbol by address.
+ * @{ */
+/** Less or equal address. (default) */
+#define RTDBGSYMADDR_FLAGS_LESS_OR_EQUAL    UINT32_C(0)
+/** Greater or equal address.  */
+#define RTDBGSYMADDR_FLAGS_GREATER_OR_EQUAL UINT32_C(1)
+/** Mask of valid flags. */
+#define RTDBGSYMADDR_FLAGS_VALID_MASK       UINT32_C(1)
+/** @} */
 
 
@@ -505,7 +517,9 @@
  * @retval  VERR_INVALID_HANDLE if hDbgAs is invalid.
  * @retval  VERR_NOT_FOUND if the address couldn't be mapped to a module.
+ * @retval  VERR_INVALID_PARAMETER if incorrect flags.
  *
  * @param   hDbgAs          The address space handle.
  * @param   Addr            The address which closest symbol is requested.
+ * @param   fFlags              Symbol search flags, see RTDBGSYMADDR_FLAGS_XXX.
  * @param   poffDisp        Where to return the distance between the symbol
  *                          and address. Optional.
@@ -513,5 +527,6 @@
  * @param   phMod           Where to return the module handle. Optional.
  */
-RTDECL(int) RTDbgAsSymbolByAddr(RTDBGAS hDbgAs, RTUINTPTR Addr, PRTINTPTR poffDisp, PRTDBGSYMBOL pSymbol, PRTDBGMOD phMod);
+RTDECL(int) RTDbgAsSymbolByAddr(RTDBGAS hDbgAs, RTUINTPTR Addr, uint32_t fFlags,
+                                PRTINTPTR poffDisp, PRTDBGSYMBOL pSymbol, PRTDBGMOD phMod);
 
 /**
@@ -521,7 +536,9 @@
  * @retval  VERR_INVALID_HANDLE if hDbgAs is invalid.
  * @retval  VERR_NOT_FOUND if the address couldn't be mapped to a module.
+ * @retval  VERR_INVALID_PARAMETER if incorrect flags.
  *
  * @param   hDbgAs          The address space handle.
  * @param   Addr            The address which closest symbol is requested.
+ * @param   fFlags              Symbol search flags, see RTDBGSYMADDR_FLAGS_XXX.
  * @param   poffDisp        Where to return the distance between the symbol
  *                          and address. Optional.
@@ -530,5 +547,6 @@
  * @param   phMod           Where to return the module handle. Optional.
  */
-RTDECL(int) RTDbgAsSymbolByAddrA(RTDBGAS hDbgAs, RTUINTPTR Addr, PRTINTPTR poffDisp, PRTDBGSYMBOL *ppSymInfo, PRTDBGMOD phMod);
+RTDECL(int) RTDbgAsSymbolByAddrA(RTDBGAS hDbgAs, RTUINTPTR Addr, uint32_t fFlags,
+                                 PRTINTPTR poffDisp, PRTDBGSYMBOL *ppSymInfo, PRTDBGMOD phMod);
 
 /**
@@ -936,8 +954,10 @@
  * @retval  VERR_DBG_INVALID_SEGMENT_OFFSET if the segment offset is beyond the
  *          end of the segment.
+ * @retval  VERR_INVALID_PARAMETER if incorrect flags.
  *
  * @param   hDbgMod             The module handle.
  * @param   iSeg                The segment number.
  * @param   off                 The offset into the segment.
+ * @param   fFlags              Symbol search flags, see RTDBGSYMADDR_FLAGS_XXX.
  * @param   poffDisp            Where to store the distance between the
  *                              specified address and the returned symbol.
@@ -945,5 +965,6 @@
  * @param   pSymInfo            Where to store the symbol information.
  */
-RTDECL(int)         RTDbgModSymbolByAddr(RTDBGMOD hDbgMod, RTDBGSEGIDX iSeg, RTUINTPTR off, PRTINTPTR poffDisp, PRTDBGSYMBOL pSymInfo);
+RTDECL(int)         RTDbgModSymbolByAddr(RTDBGMOD hDbgMod, RTDBGSEGIDX iSeg, RTUINTPTR off, uint32_t fFlags,
+                                         PRTINTPTR poffDisp, PRTDBGSYMBOL pSymInfo);
 
 /**
@@ -964,8 +985,10 @@
  *          end of the segment.
  * @retval  VERR_NO_MEMORY if RTDbgSymbolAlloc fails.
+ * @retval  VERR_INVALID_PARAMETER if incorrect flags.
  *
  * @param   hDbgMod             The module handle.
  * @param   iSeg                The segment index.
  * @param   off                 The offset into the segment.
+ * @param   fFlags              Symbol search flags, see RTDBGSYMADDR_FLAGS_XXX.
  * @param   poffDisp            Where to store the distance between the
  *                              specified address and the returned symbol. Optional.
@@ -974,5 +997,6 @@
  *                              RTDbgSymbolFree.
  */
-RTDECL(int)         RTDbgModSymbolByAddrA(RTDBGMOD hDbgMod, RTDBGSEGIDX iSeg, RTUINTPTR off, PRTINTPTR poffDisp, PRTDBGSYMBOL *ppSymInfo);
+RTDECL(int)         RTDbgModSymbolByAddrA(RTDBGMOD hDbgMod, RTDBGSEGIDX iSeg, RTUINTPTR off, uint32_t fFlags,
+                                          PRTINTPTR poffDisp, PRTDBGSYMBOL *ppSymInfo);
 
 /**
Index: trunk/src/VBox/Runtime/common/dbg/dbgas.cpp
===================================================================
--- trunk/src/VBox/Runtime/common/dbg/dbgas.cpp	(revision 41492)
+++ trunk/src/VBox/Runtime/common/dbg/dbgas.cpp	(revision 41493)
@@ -1289,13 +1289,16 @@
  * @retval  VERR_INVALID_HANDLE if hDbgAs is invalid.
  * @retval  VERR_NOT_FOUND if the address couldn't be mapped to a module.
+ * @retval  VERR_INVALID_PARAMETER if incorrect flags.
  *
  * @param   hDbgAs          The address space handle.
  * @param   Addr            The address which closest symbol is requested.
- * @param   poffDisp        Where to return the distance between the symbol
- *                          and address. Optional.
+ * @param   fFlags          Symbol search flags, see RTDBGSYMADDR_FLAGS_XXX.
+ * @param   poffDisp        Where to return the distance between the symbol and
+ *                          address. Optional.
  * @param   pSymbol         Where to return the symbol info.
  * @param   phMod           Where to return the module handle. Optional.
  */
-RTDECL(int) RTDbgAsSymbolByAddr(RTDBGAS hDbgAs, RTUINTPTR Addr, PRTINTPTR poffDisp, PRTDBGSYMBOL pSymbol, PRTDBGMOD phMod)
+RTDECL(int) RTDbgAsSymbolByAddr(RTDBGAS hDbgAs, RTUINTPTR Addr, uint32_t fFlags,
+                                PRTINTPTR poffDisp, PRTDBGSYMBOL pSymbol, PRTDBGMOD phMod)
 {
     /*
@@ -1319,5 +1322,5 @@
      * Forward the call.
      */
-    int rc = RTDbgModSymbolByAddr(hMod, iSeg, offSeg, poffDisp, pSymbol);
+    int rc = RTDbgModSymbolByAddr(hMod, iSeg, offSeg, fFlags, poffDisp, pSymbol);
     if (RT_SUCCESS(rc))
         rtDbgAsAdjustSymbolValue(pSymbol, hMod, MapAddr, iSeg);
@@ -1337,7 +1340,9 @@
  * @retval  VERR_INVALID_HANDLE if hDbgAs is invalid.
  * @retval  VERR_NOT_FOUND if the address couldn't be mapped to a module.
+ * @retval  VERR_INVALID_PARAMETER if incorrect flags.
  *
  * @param   hDbgAs          The address space handle.
  * @param   Addr            The address which closest symbol is requested.
+ * @param   fFlags              Symbol search flags, see RTDBGSYMADDR_FLAGS_XXX.
  * @param   poffDisp        Where to return the distance between the symbol
  *                          and address. Optional.
@@ -1346,5 +1351,6 @@
  * @param   phMod           Where to return the module handle. Optional.
  */
-RTDECL(int) RTDbgAsSymbolByAddrA(RTDBGAS hDbgAs, RTUINTPTR Addr, PRTINTPTR poffDisp, PRTDBGSYMBOL *ppSymInfo, PRTDBGMOD phMod)
+RTDECL(int) RTDbgAsSymbolByAddrA(RTDBGAS hDbgAs, RTUINTPTR Addr, uint32_t fFlags,
+                                 PRTINTPTR poffDisp, PRTDBGSYMBOL *ppSymInfo, PRTDBGMOD phMod)
 {
     /*
@@ -1368,5 +1374,5 @@
      * Forward the call.
      */
-    int rc = RTDbgModSymbolByAddrA(hMod, iSeg, offSeg, poffDisp, ppSymInfo);
+    int rc = RTDbgModSymbolByAddrA(hMod, iSeg, offSeg, fFlags, poffDisp, ppSymInfo);
     if (RT_SUCCESS(rc))
         rtDbgAsAdjustSymbolValue(*ppSymInfo, hMod, MapAddr, iSeg);
Index: trunk/src/VBox/Runtime/common/dbg/dbgmod.cpp
===================================================================
--- trunk/src/VBox/Runtime/common/dbg/dbgmod.cpp	(revision 41492)
+++ trunk/src/VBox/Runtime/common/dbg/dbgmod.cpp	(revision 41493)
@@ -1121,8 +1121,10 @@
  * @retval  VERR_DBG_INVALID_SEGMENT_OFFSET if the segment offset is beyond the
  *          end of the segment.
+ * @retval  VERR_INVALID_PARAMETER if incorrect flags.
  *
  * @param   hDbgMod             The module handle.
  * @param   iSeg                The segment number.
  * @param   off                 The offset into the segment.
+ * @param   fFlags              Symbol search flags, see RTDBGSYMADDR_FLAGS_XXX.
  * @param   poffDisp            Where to store the distance between the
  *                              specified address and the returned symbol.
@@ -1130,5 +1132,6 @@
  * @param   pSymInfo            Where to store the symbol information.
  */
-RTDECL(int) RTDbgModSymbolByAddr(RTDBGMOD hDbgMod, RTDBGSEGIDX iSeg, RTUINTPTR off, PRTINTPTR poffDisp, PRTDBGSYMBOL pSymInfo)
+RTDECL(int) RTDbgModSymbolByAddr(RTDBGMOD hDbgMod, RTDBGSEGIDX iSeg, RTUINTPTR off, uint32_t fFlags,
+                                 PRTINTPTR poffDisp, PRTDBGSYMBOL pSymInfo)
 {
     /*
@@ -1139,4 +1142,5 @@
     AssertPtrNull(poffDisp);
     AssertPtr(pSymInfo);
+    AssertReturn(!(fFlags & ~RTDBGSYMADDR_FLAGS_VALID_MASK), VERR_INVALID_PARAMETER);
 
     RTDBGMOD_LOCK(pDbgMod);
@@ -1158,5 +1162,5 @@
      * Get down to business.
      */
-    int rc = pDbgMod->pDbgVt->pfnSymbolByAddr(pDbgMod, iSeg, off, poffDisp, pSymInfo);
+    int rc = pDbgMod->pDbgVt->pfnSymbolByAddr(pDbgMod, iSeg, off, fFlags, poffDisp, pSymInfo);
 
     RTDBGMOD_UNLOCK(pDbgMod);
@@ -1183,8 +1187,10 @@
  *          end of the segment.
  * @retval  VERR_NO_MEMORY if RTDbgSymbolAlloc fails.
+ * @retval  VERR_INVALID_PARAMETER if incorrect flags.
  *
  * @param   hDbgMod             The module handle.
  * @param   iSeg                The segment index.
  * @param   off                 The offset into the segment.
+ * @param   fFlags              Symbol search flags, see RTDBGSYMADDR_FLAGS_XXX.
  * @param   poffDisp            Where to store the distance between the
  *                              specified address and the returned symbol. Optional.
@@ -1193,5 +1199,6 @@
  *                              RTDbgSymbolFree.
  */
-RTDECL(int) RTDbgModSymbolByAddrA(RTDBGMOD hDbgMod, RTDBGSEGIDX iSeg, RTUINTPTR off, PRTINTPTR poffDisp, PRTDBGSYMBOL *ppSymInfo)
+RTDECL(int) RTDbgModSymbolByAddrA(RTDBGMOD hDbgMod, RTDBGSEGIDX iSeg, RTUINTPTR off, uint32_t fFlags,
+                                  PRTINTPTR poffDisp, PRTDBGSYMBOL *ppSymInfo)
 {
     AssertPtr(ppSymInfo);
@@ -1202,5 +1209,5 @@
         return VERR_NO_MEMORY;
 
-    int rc = RTDbgModSymbolByAddr(hDbgMod, iSeg, off, poffDisp, pSymInfo);
+    int rc = RTDbgModSymbolByAddr(hDbgMod, iSeg, off, fFlags, poffDisp, pSymInfo);
 
     if (RT_SUCCESS(rc))
Index: trunk/src/VBox/Runtime/common/dbg/dbgmodcontainer.cpp
===================================================================
--- trunk/src/VBox/Runtime/common/dbg/dbgmodcontainer.cpp	(revision 41492)
+++ trunk/src/VBox/Runtime/common/dbg/dbgmodcontainer.cpp	(revision 41493)
@@ -288,5 +288,5 @@
 
 /** @copydoc RTDBGMODVTDBG::pfnSymbolByAddr */
-static DECLCALLBACK(int) rtDbgModContainer_SymbolByAddr(PRTDBGMODINT pMod, RTDBGSEGIDX iSeg, RTUINTPTR off,
+static DECLCALLBACK(int) rtDbgModContainer_SymbolByAddr(PRTDBGMODINT pMod, RTDBGSEGIDX iSeg, RTUINTPTR off, uint32_t fFlags,
                                                         PRTINTPTR poffDisp, PRTDBGSYMBOL pSymInfo)
 {
@@ -312,5 +312,5 @@
                                                             : &pThis->paSegs[iSeg].SymAddrTree,
                                                             off,
-                                                            false /*fAbove*/);
+                                                            fFlags == RTDBGSYMADDR_FLAGS_GREATER_OR_EQUAL /*fAbove*/);
     if (!pAvlCore)
         return VERR_SYMBOL_NOT_FOUND;
Index: trunk/src/VBox/Runtime/common/dbg/dbgmoddwarf.cpp
===================================================================
--- trunk/src/VBox/Runtime/common/dbg/dbgmoddwarf.cpp	(revision 41492)
+++ trunk/src/VBox/Runtime/common/dbg/dbgmoddwarf.cpp	(revision 41493)
@@ -3301,9 +3301,9 @@
 
 /** @interface_method_impl{RTDBGMODVTDBG,pfnSymbolByAddr} */
-static DECLCALLBACK(int) rtDbgModDwarf_SymbolByAddr(PRTDBGMODINT pMod, RTDBGSEGIDX iSeg, RTUINTPTR off,
+static DECLCALLBACK(int) rtDbgModDwarf_SymbolByAddr(PRTDBGMODINT pMod, RTDBGSEGIDX iSeg, RTUINTPTR off, uint32_t fFlags,
                                                     PRTINTPTR poffDisp, PRTDBGSYMBOL pSymInfo)
 {
     PRTDBGMODDWARF pThis = (PRTDBGMODDWARF)pMod->pvDbgPriv;
-    return RTDbgModSymbolByAddr(pThis->hCnt, iSeg, off, poffDisp, pSymInfo);
+    return RTDbgModSymbolByAddr(pThis->hCnt, iSeg, off, fFlags, poffDisp, pSymInfo);
 }
 
Index: trunk/src/VBox/Runtime/common/dbg/dbgmodnm.cpp
===================================================================
--- trunk/src/VBox/Runtime/common/dbg/dbgmodnm.cpp	(revision 41492)
+++ trunk/src/VBox/Runtime/common/dbg/dbgmodnm.cpp	(revision 41493)
@@ -92,9 +92,9 @@
 
 /** @interface_method_impl{RTDBGMODVTDBG,pfnSymbolByAddr} */
-static DECLCALLBACK(int) rtDbgModNm_SymbolByAddr(PRTDBGMODINT pMod, RTDBGSEGIDX iSeg, RTUINTPTR off,
+static DECLCALLBACK(int) rtDbgModNm_SymbolByAddr(PRTDBGMODINT pMod, RTDBGSEGIDX iSeg, RTUINTPTR off, uint32_t fFlags,
                                                  PRTINTPTR poffDisp, PRTDBGSYMBOL pSymInfo)
 {
     PRTDBGMODNM pThis = (PRTDBGMODNM)pMod->pvDbgPriv;
-    return RTDbgModSymbolByAddr(pThis->hCnt, iSeg, off, poffDisp, pSymInfo);
+    return RTDbgModSymbolByAddr(pThis->hCnt, iSeg, off, fFlags, poffDisp, pSymInfo);
 }
 
Index: trunk/src/VBox/Runtime/include/internal/dbgmod.h
===================================================================
--- trunk/src/VBox/Runtime/include/internal/dbgmod.h	(revision 41492)
+++ trunk/src/VBox/Runtime/include/internal/dbgmod.h	(revision 41493)
@@ -364,9 +364,11 @@
      * @param   iSeg        The segment number (0-based) or RTDBGSEGIDX_ABS.
      * @param   off         The offset into the segment.
+     * @param   fFlags      Symbol search flags, see RTDBGSYMADDR_FLAGS_XXX.
      * @param   poffDisp    Where to store the distance between the specified address
      *                      and the returned symbol. Optional.
      * @param   pSymInfo    Where to store the symbol information.
      */
-    DECLCALLBACKMEMBER(int, pfnSymbolByAddr)(PRTDBGMODINT pMod, uint32_t iSeg, RTUINTPTR off, PRTINTPTR poffDisp, PRTDBGSYMBOL pSymInfo);
+    DECLCALLBACKMEMBER(int, pfnSymbolByAddr)(PRTDBGMODINT pMod, uint32_t iSeg, RTUINTPTR off, uint32_t fFlags,
+                                             PRTINTPTR poffDisp, PRTDBGSYMBOL pSymInfo);
 
 
Index: trunk/src/VBox/Runtime/tools/RTLdrFlt.cpp
===================================================================
--- trunk/src/VBox/Runtime/tools/RTLdrFlt.cpp	(revision 41492)
+++ trunk/src/VBox/Runtime/tools/RTLdrFlt.cpp	(revision 41493)
@@ -322,5 +322,5 @@
                     RTDBGSYMBOL Symbol;
                     RTINTPTR    offSym;
-                    rc = RTDbgAsSymbolByAddr(hDbgAs, u64Address, &offSym, &Symbol, NULL);
+                    rc = RTDbgAsSymbolByAddr(hDbgAs, u64Address, RTDBGSYMADDR_FLAGS_LESS_OR_EQUAL, &offSym, &Symbol, NULL);
                     if (RT_SUCCESS(rc))
                     {
Index: trunk/src/VBox/VMM/VMMR3/DBGFAddrSpace.cpp
===================================================================
--- trunk/src/VBox/VMM/VMMR3/DBGFAddrSpace.cpp	(revision 41492)
+++ trunk/src/VBox/VMM/VMMR3/DBGFAddrSpace.cpp	(revision 41493)
@@ -1011,5 +1011,5 @@
      */
     RTDBGMOD hMod;
-    int rc = RTDbgAsSymbolByAddr(hRealAS, pAddress->FlatPtr, poffDisp, pSymbol, &hMod);
+    int rc = RTDbgAsSymbolByAddr(hRealAS, pAddress->FlatPtr, poffDisp, RTDBGSYMADDR_FLAGS_LESS_OR_EQUAL, pSymbol, &hMod);
     if (RT_SUCCESS(rc))
     {
