Changeset 40855 in vbox for trunk/src/VBox/Runtime/r0drv/solaris
- Timestamp:
- Apr 10, 2012 3:10:41 PM (13 years ago)
- svn:sync-xref-src-repo-rev:
- 77384
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r0drv/solaris/dbg-r0drv-solaris.c
r40745 r40855 40 40 #include <iprt/string.h> 41 41 #include <iprt/thread.h> 42 43 #include "internal/magics.h" 42 44 43 45 … … 62 64 typedef struct RTDBGKRNLINFOINT *PRTDBGKRNLINFOINT; 63 65 64 /** Magic value for RTDBGKRNLINFOINT::u32Magic. (John Carmack) */65 #define RTDBGKRNLINFO_MAGIC UINT32_C(0x19700820)66 67 66 68 67 /** … … 168 167 { 169 168 PRTDBGKRNLINFOINT pThis = hKrnlInfo; 169 AssertPtrReturn(pThis, UINT32_MAX); 170 AssertMsgReturn(pThis->u32Magic == RTDBGKRNLINFO_MAGIC, ("%p: u32Magic=%RX32\n", pThis, pThis->u32Magic), UINT32_MAX); 171 170 172 uint32_t cRefs = ASMAtomicIncU32(&pThis->cRefs); 171 173 Assert(cRefs && cRefs < 100000); … … 177 179 { 178 180 PRTDBGKRNLINFOINT pThis = hKrnlInfo; 181 if (pThis == NIL_RTDBGKRNLINFO) 182 return 0; 179 183 AssertPtrReturn(pThis, UINT32_MAX); 180 184 AssertMsgReturn(pThis->u32Magic == RTDBGKRNLINFO_MAGIC, ("%p: u32Magic=%RX32\n", pThis, pThis->u32Magic), UINT32_MAX); … … 227 231 AssertMsgReturn(pThis->u32Magic == RTDBGKRNLINFO_MAGIC, ("%p: u32Magic=%RX32\n", pThis, pThis->u32Magic), VERR_INVALID_HANDLE); 228 232 AssertPtrReturn(pszSymbol, VERR_INVALID_PARAMETER); 229 AssertPtr Return(ppvSymbol, VERR_INVALID_PARAMETER);233 AssertPtrNullReturn(ppvSymbol, VERR_INVALID_PARAMETER); 230 234 AssertReturn(!pszModule, VERR_MODULE_NOT_FOUND); 231 235 RT_ASSERT_PREEMPTIBLE(); 232 236 233 *ppvSymbol = (void *)kobj_getsymvalue((char *)pszSymbol, 1 /* only kernel */); 234 if (*ppvSymbol) 237 uintptr_t uValue = kobj_getsymvalue((char *)pszSymbol, 1 /* only kernel */); 238 if (ppvSymbol) 239 *ppvSymbol = (void *)uValue; 240 if (uValue) 235 241 return VINF_SUCCESS; 236 237 242 return VERR_SYMBOL_NOT_FOUND; 238 243 }
Note:
See TracChangeset
for help on using the changeset viewer.