Changeset 40855 in vbox
- Timestamp:
- Apr 10, 2012 3:10:41 PM (13 years ago)
- svn:sync-xref-src-repo-rev:
- 77384
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/dbg.h
r40705 r40855 1151 1151 # endif /* IN_RING3 */ 1152 1152 1153 # ifdef IN_RING01154 1153 1155 1154 /** @name Kernel Debug Info API … … 1232 1231 * @param pszModule Reserved for future extensions. Pass NULL. 1233 1232 * @param pszSymbol The C name of the symbol. 1234 * @param ppvSymbol Where to return the symbol value. 1233 * @param ppvSymbol Where to return the symbol value, passing NULL is 1234 * OK. This may be modified even on failure, in 1235 * particular, it will be set to NULL when 1236 * VERR_SYMBOL_NOT_FOUND is returned. 1235 1237 * 1236 1238 * @sa RTLdrGetSymbol. … … 1240 1242 /** @} */ 1241 1243 1242 # endif /* IN_RING0 */1243 1244 1244 /** @} */ 1245 1245 -
trunk/src/VBox/Runtime/include/internal/magics.h
r40029 r40855 39 39 /** Magic number for RTDBGMODVTIMG::u32Magic. (Cecil McBee) */ 40 40 #define RTDBGMODVTIMG_MAGIC UINT32_C(0x19350419) 41 /** Magic value for RTDBGKRNLINFOINT::u32Magic. (John Carmack) */ 42 #define RTDBGKRNLINFO_MAGIC UINT32_C(0x19700820) 41 43 /** The value of RTDIR::u32Magic. (Michael Ende) */ 42 44 #define RTDIR_MAGIC UINT32_C(0x19291112) -
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.