Index: trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c
===================================================================
--- trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c	(revision 48740)
+++ trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c	(revision 48747)
@@ -636,4 +636,7 @@
   //
   PERF_END(NULL, "BDS", NULL, 0);
+
+  DEBUG((DEBUG_INFO, "BdsLibBootViaBootOption: BootCurrent=0x%x OptionName=%s Description=%s StatusString=%s Attribute=0x%x LoadOptionsSize=0x%x\n",
+         Option->BootCurrent, Option->OptionName, Option->Description, Option->StatusString, Option->Attribute, Option->LoadOptionsSize));
 
   *ExitDataSize = 0;
Index: trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Include/Library/DebugLib.h
===================================================================
--- trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Include/Library/DebugLib.h	(revision 48740)
+++ trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Include/Library/DebugLib.h	(revision 48747)
@@ -477,22 +477,30 @@
 CHAR16 *VBoxDebugHandleDevicePath2Str(IN EFI_HANDLE hHandle);
 # endif
+/** See RT_XSTR */
+# define VBOX_XSTR(str)                         VBOX_STR(str)
+/** See RT_STR */
+# define VBOX_STR(str)                          #str
 # if defined(EFI_LOG_ENABLED)
-#  define VBoxLogFlowFuncEnter() DEBUG((DEBUG_INFO, "ENTER:%a:%d\n", __FUNCTION__, __LINE__))
-#  define VBoxLogFlowFuncLeave() DEBUG((DEBUG_INFO, "LEAVE:%a:%d\n", __FUNCTION__, __LINE__))
-#  define VBoxLogFlowFuncLeaveRC(rc) DEBUG((DEBUG_INFO, "LEAVE:%a:%d rc(%r)\n", __FUNCTION__, __LINE__, (rc)))
-#  define VBoxLogFlowFuncMark() DEBUG((DEBUG_INFO, "%a:%d\n", __FUNCTION__, __LINE__))
-#  define VBoxLogFlowFuncMarkRC(rc) DEBUG((DEBUG_INFO, "%a:%d " #rc ":%r \n", __FUNCTION__, __LINE__, (rc)))
-#  define VBoxLogFlowFuncMarkVar(var, var_printf_glag) DEBUG((DEBUG_INFO, "%a:%d " #var ": " var_printf_glag " \n", __FUNCTION__, __LINE__, (var)))
-#  define VBoxLogFlowFuncMarkDP(dp) DEBUG((DEBUG_INFO, "%a:%d " #dp ": \n", __FUNCTION__, __LINE__, VBoxDebugDevicePath2Str(dp)))
-#  define VBoxLogFlowFuncMarkHandleDP(dp) DEBUG((DEBUG_INFO, "%a:%d " #dp ": \n", __FUNCTION__, __LINE__, VBoxDebugHandleDevicePath2Str(dp)))
+#  define VBoxLogFlowFuncEnter()                DEBUG((DEBUG_INFO, "%a:" VBOX_XSTR(__LINE__) ": ENTER\n", __FUNCTION__))
+#  define VBoxLogFlowFuncLeave()                DEBUG((DEBUG_INFO, "%a:" VBOX_XSTR(__LINE__) ": LEAVE\n", __FUNCTION__))
+#  define VBoxLogFlowFuncLeaveRC(rc)            DEBUG((DEBUG_INFO, "%a:" VBOX_XSTR(__LINE__) ": LEAVE " #rc "=%r\n", \
+                                                       __FUNCTION__, rc))
+#  define VBoxLogFlowFuncMark()                 DEBUG((DEBUG_INFO, "%a:" VBOX_XSTR(__LINE__) "\n", __FUNCTION__))
+#  define VBoxLogFlowFuncMarkRC(rc)             DEBUG((DEBUG_INFO, "%a:" VBOX_XSTR(__LINE__) ": " #rc "=%r\n", __FUNCTION__, rc))
+#  define VBoxLogFlowFuncMarkVar(var, varfmt) \
+    DEBUG((DEBUG_INFO, "%a:" VBOX_XSTR(__LINE__) " " #var "=" varfmt "\n", __FUNCTION__, (var)))
+#  define VBoxLogFlowFuncMarkDP(dp)             DEBUG((DEBUG_INFO, "%a:" VBOX_XSTR(__LINE__) ": " #dp "=%s\n", \
+                                                       __FUNCTION__, VBoxDebugDevicePath2Str(dp)))
+#  define VBoxLogFlowFuncMarkHandleDP(dp)       DEBUG((DEBUG_INFO, "%a:" VBOX_XSTR(__LINE__) ": " #dp "=%s\n", \
+                                                       __FUNCTION__, VBoxDebugHandleDevicePath2Str(dp)))
 # else
-#  define VBoxLogFlowFuncEnter() do {} while (0)
-#  define VBoxLogFlowFuncLeave() do {} while (0)
-#  define VBoxLogFlowFuncLeaveRC(rc) do {} while (0)
-#  define VBoxLogFlowFuncMark() do {} while (0)
-#  define VBoxLogFlowFuncMarkRC(rc) do {} while (0)
-#  define VBoxLogFlowFuncMarkVar(var, var_printf_flag) do {} while (0)
-#  define VBoxLogFlowFuncMarkDP(dp) do {} while (0)
-#  define VBoxLogLogFlowFuncMarkHandleDP(dp) do {} while (0)
+#  define VBoxLogFlowFuncEnter()                do {} while (0)
+#  define VBoxLogFlowFuncLeave()                do {} while (0)
+#  define VBoxLogFlowFuncLeaveRC(rc)            do {} while (0)
+#  define VBoxLogFlowFuncMark()                 do {} while (0)
+#  define VBoxLogFlowFuncMarkRC(rc)             do {} while (0)
+#  define VBoxLogFlowFuncMarkVar(var, varfmt)   do {} while (0)
+#  define VBoxLogFlowFuncMarkDP(dp)             do {} while (0)
+#  define VBoxLogLogFlowFuncMarkHandleDP(dp)    do {} while (0)
 # endif
 #endif
