Changeset 41052 in vbox
- Timestamp:
- Apr 25, 2012 3:01:48 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r0drv/darwin/dbgkrnlinfo-r0drv-darwin.cpp
r41050 r41052 145 145 /** The file offset of the symbol table. */ 146 146 uint32_t offSyms; 147 /** Offset between link address and actual load address. */ 148 uintptr_t offLoad; 147 149 /** @} */ 148 150 … … 359 361 * Looks up a kernel symbol. 360 362 * 361 *362 363 * @returns The symbol address on success, 0 on failure. 363 364 * @param pThis The internal scratch data. … … 380 381 if ( *pszTabName == '_' 381 382 && strcmp(pszTabName + 1, pszSymbol) == 0) 382 return pSym->n_value ;383 return pSym->n_value + pThis->offLoad; 383 384 } 384 385 #else … … 524 525 KNOWN_ENTRY(vm_map_wire), 525 526 KNOWN_ENTRY(PE_kputc), 527 KNOWN_ENTRY(kernel_map), 528 KNOWN_ENTRY(kernel_pmap), 526 529 }; 527 530 … … 1037 1040 rc = rtR0DbgKrnlDarwinLoadSymTab(pThis); 1038 1041 if (RT_SUCCESS(rc)) 1042 { 1043 #ifdef IN_RING0 1044 /* 1045 * Determine the load displacement (10.8 kernels are PIE). 1046 */ 1047 uintptr_t uLinkAddr = rtR0DbgKrnlDarwinLookup(pThis, "kernel_map"); 1048 if (uLinkAddr != 0) 1049 pThis->offLoad = (uintptr_t)&kernel_map - uLinkAddr; 1050 #endif 1039 1051 rc = rtR0DbgKrnlDarwinCheckStandardSymbols(pThis); 1052 } 1040 1053 1041 1054 rtR0DbgKrnlDarwinLoadDone(pThis);
Note:
See TracChangeset
for help on using the changeset viewer.