From 639b95a4fd23d483db9aa2cde0141dfe6505b865 Mon Sep 17 00:00:00 2001 From: vboxsync Date: Thu, 12 Jul 2018 21:06:33 +0000 Subject: *: Made RT_UOFFSETOF, RT_OFFSETOF, RT_UOFFSETOF_ADD and RT_OFFSETOF_ADD work like __builtin_offsetof() and require compile time resolvable requests, adding RT_UOFFSETOF_DYN for the dynamic questions that can only be answered at runtime. git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@73097 cfe28804-0f27-0410-a406-dd0f0b0b656f --- src/VBox/VMM/VMMR3/DBGFReg.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/VBox/VMM/VMMR3/DBGFReg.cpp') diff --git a/src/VBox/VMM/VMMR3/DBGFReg.cpp b/src/VBox/VMM/VMMR3/DBGFReg.cpp index 613ab07c6cf..b2a1e7403f1 100644 --- a/src/VBox/VMM/VMMR3/DBGFReg.cpp +++ b/src/VBox/VMM/VMMR3/DBGFReg.cpp @@ -345,7 +345,7 @@ static int dbgfR3RegRegisterCommon(PUVM pUVM, PCDBGFREGDESC paRegisters, DBGFREG /* * Allocate a new record and all associated lookup records. */ - size_t cbRegSet = RT_OFFSETOF(DBGFREGSET, szPrefix[cchPrefix + 4 + 1]); + size_t cbRegSet = RT_UOFFSETOF_DYN(DBGFREGSET, szPrefix[cchPrefix + 4 + 1]); cbRegSet = RT_ALIGN_Z(cbRegSet, 32); size_t const offLookupRecArray = cbRegSet; cbRegSet += cLookupRecs * sizeof(DBGFREGLOOKUP); -- cgit v1.2.1