https://git.reactos.org/?p=reactos.git;a=commitdiff;h=eeaddf5bbca9fff119ec7…
commit eeaddf5bbca9fff119ec767724e7b38a2eb27dfe
Author: Mark Jansen <mark.jansen(a)reactos.org>
AuthorDate: Tue Jan 31 16:26:21 2023 +0100
Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org>
CommitDate: Fri Feb 3 17:45:14 2023 +0100
[DBGHELP_APITEST] Skip more tests on 2k3's dbghelp.dll
---
modules/rostests/apitests/dbghelp/pdb.c | 163 ++++++++++++++++----------------
1 file changed, 82 insertions(+), 81 deletions(-)
diff --git a/modules/rostests/apitests/dbghelp/pdb.c
b/modules/rostests/apitests/dbghelp/pdb.c
index e36a1b8fee5..ae88fe291f6 100644
--- a/modules/rostests/apitests/dbghelp/pdb.c
+++ b/modules/rostests/apitests/dbghelp/pdb.c
@@ -310,92 +310,93 @@ static void test_SymFromAddr(HANDLE hProc, DWORD64 BaseAddress)
DWORD64 Displacement;
DWORD dwErr;
- /* No address found before load address of module */
- Displacement = 0;
- INIT_PSYM(buffer);
- Ret = SymFromAddr(hProc, BaseAddress -1, &Displacement, pSymbol);
- dwErr = GetLastError();
- ok_int(Ret, FALSE);
- ok_hex(dwErr, ERROR_MOD_NOT_FOUND);
-
- /* Right at the start of the module is recognized as the first symbol found */
- Displacement = 0;
- INIT_PSYM(buffer);
- Ret = SymFromAddr(hProc, BaseAddress, &Displacement, pSymbol);
- ok_int(Ret, TRUE);
- ok_ulonglong(Displacement, 0xffffffffffffffff);
- ok_ulonglong(pSymbol->ModBase, BaseAddress);
- ok_hex(pSymbol->Flags, 0);
- ok_ulonglong(pSymbol->Address, BaseAddress + 0x1010);
- ok_hex(pSymbol->Tag, SymTagFunction);
- ok_str(pSymbol->Name, "DllMain");
-
- /* The actual first instruction of the function */
- Displacement = 0;
- INIT_PSYM(buffer);
- Ret = SymFromAddr(hProc, BaseAddress + 0x1010, &Displacement, pSymbol);
- ok_int(Ret, TRUE);
- ok_ulonglong(Displacement, 0);
- ok_ulonglong(pSymbol->ModBase, BaseAddress);
- ok_hex(pSymbol->Flags, 0);
- ok_ulonglong(pSymbol->Address, BaseAddress + 0x1010);
- ok_hex(pSymbol->Tag, SymTagFunction);
- ok_str(pSymbol->Name, "DllMain");
-
- /* The last instruction in the function */
- Displacement = 0;
- INIT_PSYM(buffer);
- Ret = SymFromAddr(hProc, BaseAddress + 0x102D, &Displacement, pSymbol);
- ok_int(Ret, TRUE);
- ok_ulonglong(Displacement, 0x1d);
- ok_ulonglong(pSymbol->ModBase, BaseAddress);
- ok_hex(pSymbol->Flags, 0);
- ok_ulonglong(pSymbol->Address, BaseAddress + 0x1010);
- ok_hex(pSymbol->Tag, SymTagFunction);
- ok_str(pSymbol->Name, "DllMain");
-
- /* The padding below the function */
- Displacement = 0;
- INIT_PSYM(buffer);
- Ret = SymFromAddr(hProc, BaseAddress + 0x102E, &Displacement, pSymbol);
- ok_int(Ret, TRUE);
- ok_ulonglong(Displacement, 0x1e);
- ok_ulonglong(pSymbol->ModBase, BaseAddress);
- ok_hex(pSymbol->Flags, 0);
- ok_ulonglong(pSymbol->Address, BaseAddress + 0x1010);
- ok_hex(pSymbol->Tag, SymTagFunction);
- ok_str(pSymbol->Name, "DllMain");
-
- /* One byte before the next function */
- Displacement = 0;
- INIT_PSYM(buffer);
- Ret = SymFromAddr(hProc, BaseAddress + 0x103f, &Displacement, pSymbol);
- ok_int(Ret, TRUE);
- ok_ulonglong(Displacement, 0x2f);
- ok_ulonglong(pSymbol->ModBase, BaseAddress);
- ok_hex(pSymbol->Flags, 0);
- ok_ulonglong(pSymbol->Address, BaseAddress + 0x1010);
- ok_hex(pSymbol->Tag, SymTagFunction);
- ok_str(pSymbol->Name, "DllMain");
-
- /* First byte of the next function */
- Displacement = 0;
- INIT_PSYM(buffer);
- Ret = SymFromAddr(hProc, BaseAddress + 0x1040, &Displacement, pSymbol);
- ok_int(Ret, TRUE);
- ok_ulonglong(Displacement, 0);
- ok_ulonglong(pSymbol->ModBase, BaseAddress);
- ok_hex(pSymbol->Flags, 0);
- ok_ulonglong(pSymbol->Address, BaseAddress + 0x1040);
- ok_hex(pSymbol->Tag, SymTagFunction);
- ok_str(pSymbol->Name, "FfsChkdsk");
-
if (!supports_pdb(hProc, BaseAddress))
{
- skip("dbghelp.dll too old or cannot read this symbol!\n");
+ skip("dbghelp.dll too old or cannot enumerate symbols!\n");
}
else
{
+
+ /* No address found before load address of module */
+ Displacement = 0;
+ INIT_PSYM(buffer);
+ Ret = SymFromAddr(hProc, BaseAddress -1, &Displacement, pSymbol);
+ dwErr = GetLastError();
+ ok_int(Ret, FALSE);
+ ok_hex(dwErr, ERROR_MOD_NOT_FOUND);
+
+ /* Right at the start of the module is recognized as the first symbol found */
+ Displacement = 0;
+ INIT_PSYM(buffer);
+ Ret = SymFromAddr(hProc, BaseAddress, &Displacement, pSymbol);
+ ok_int(Ret, TRUE);
+ ok_ulonglong(Displacement, 0xffffffffffffffff);
+ ok_ulonglong(pSymbol->ModBase, BaseAddress);
+ ok_hex(pSymbol->Flags, 0);
+ ok_ulonglong(pSymbol->Address, BaseAddress + 0x1010);
+ ok_hex(pSymbol->Tag, SymTagFunction);
+ ok_str(pSymbol->Name, "DllMain");
+
+ /* The actual first instruction of the function */
+ Displacement = 0;
+ INIT_PSYM(buffer);
+ Ret = SymFromAddr(hProc, BaseAddress + 0x1010, &Displacement, pSymbol);
+ ok_int(Ret, TRUE);
+ ok_ulonglong(Displacement, 0);
+ ok_ulonglong(pSymbol->ModBase, BaseAddress);
+ ok_hex(pSymbol->Flags, 0);
+ ok_ulonglong(pSymbol->Address, BaseAddress + 0x1010);
+ ok_hex(pSymbol->Tag, SymTagFunction);
+ ok_str(pSymbol->Name, "DllMain");
+
+ /* The last instruction in the function */
+ Displacement = 0;
+ INIT_PSYM(buffer);
+ Ret = SymFromAddr(hProc, BaseAddress + 0x102D, &Displacement, pSymbol);
+ ok_int(Ret, TRUE);
+ ok_ulonglong(Displacement, 0x1d);
+ ok_ulonglong(pSymbol->ModBase, BaseAddress);
+ ok_hex(pSymbol->Flags, 0);
+ ok_ulonglong(pSymbol->Address, BaseAddress + 0x1010);
+ ok_hex(pSymbol->Tag, SymTagFunction);
+ ok_str(pSymbol->Name, "DllMain");
+
+ /* The padding below the function */
+ Displacement = 0;
+ INIT_PSYM(buffer);
+ Ret = SymFromAddr(hProc, BaseAddress + 0x102E, &Displacement, pSymbol);
+ ok_int(Ret, TRUE);
+ ok_ulonglong(Displacement, 0x1e);
+ ok_ulonglong(pSymbol->ModBase, BaseAddress);
+ ok_hex(pSymbol->Flags, 0);
+ ok_ulonglong(pSymbol->Address, BaseAddress + 0x1010);
+ ok_hex(pSymbol->Tag, SymTagFunction);
+ ok_str(pSymbol->Name, "DllMain");
+
+ /* One byte before the next function */
+ Displacement = 0;
+ INIT_PSYM(buffer);
+ Ret = SymFromAddr(hProc, BaseAddress + 0x103f, &Displacement, pSymbol);
+ ok_int(Ret, TRUE);
+ ok_ulonglong(Displacement, 0x2f);
+ ok_ulonglong(pSymbol->ModBase, BaseAddress);
+ ok_hex(pSymbol->Flags, 0);
+ ok_ulonglong(pSymbol->Address, BaseAddress + 0x1010);
+ ok_hex(pSymbol->Tag, SymTagFunction);
+ ok_str(pSymbol->Name, "DllMain");
+
+ /* First byte of the next function */
+ Displacement = 0;
+ INIT_PSYM(buffer);
+ Ret = SymFromAddr(hProc, BaseAddress + 0x1040, &Displacement, pSymbol);
+ ok_int(Ret, TRUE);
+ ok_ulonglong(Displacement, 0);
+ ok_ulonglong(pSymbol->ModBase, BaseAddress);
+ ok_hex(pSymbol->Flags, 0);
+ ok_ulonglong(pSymbol->Address, BaseAddress + 0x1040);
+ ok_hex(pSymbol->Tag, SymTagFunction);
+ ok_str(pSymbol->Name, "FfsChkdsk");
+
/* .idata */
Displacement = 0;
INIT_PSYM(buffer);