| | 78 | |
|---|
| | 79 | __BEGIN_DECLS |
|---|
| | 80 | |
|---|
| | 81 | /** |
|---|
| | 82 | * The 1st part of an assert message. |
|---|
| | 83 | * |
|---|
| | 84 | * @param pszExpr Expression. Can be NULL. |
|---|
| | 85 | * @param uLine Location line number. |
|---|
| | 86 | * @param pszFile Location file name. |
|---|
| | 87 | * @param pszFunction Location function name. |
|---|
| | 88 | * @remark This API exists in HC Ring-3 and GC. |
|---|
| | 89 | */ |
|---|
| | 90 | RTDECL(void) AssertMsg1(const char *pszExpr, unsigned uLine, const char *pszFile, const char *pszFunction); |
|---|
| | 91 | |
|---|
| | 92 | /** |
|---|
| | 93 | * The 2nd (optional) part of an assert message. |
|---|
| | 94 | * @param pszFormat Printf like format string. |
|---|
| | 95 | * @param ... Arguments to that string. |
|---|
| | 96 | * @remark This API exists in HC Ring-3 and GC. |
|---|
| | 97 | */ |
|---|
| | 98 | RTDECL(void) AssertMsg2(const char *pszFormat, ...); |
|---|
| | 99 | |
|---|
| | 100 | /** |
|---|
| | 101 | * Overridable function that decides whether assertions executes the breakpoint or not. |
|---|
| | 102 | * |
|---|
| | 103 | * The generic implementation will return true. |
|---|
| | 104 | * |
|---|
| | 105 | * @returns true if the breakpoint should be hit, false if it should be ignored. |
|---|
| | 106 | * @remark The RTDECL() makes this a bit difficult to override on windows. Sorry. |
|---|
| | 107 | */ |
|---|
| | 108 | RTDECL(bool) RTAssertDoBreakpoint(void); |
|---|
| | 109 | |
|---|
| | 110 | /** The last assert message, 1st part. */ |
|---|
| | 111 | extern RTDATADECL(char) g_szRTAssertMsg1[1024]; |
|---|
| | 112 | /** The last assert message, 2nd part. */ |
|---|
| | 113 | extern RTDATADECL(char) g_szRTAssertMsg2[2048]; |
|---|
| | 114 | |
|---|
| | 115 | __END_DECLS |
|---|
| 1950 | | * @param pv The pointer. |
|---|
| 1951 | | */ |
|---|
| 1952 | | #define AssertGCPhys32(pv) AssertMsg(VALID_PHYS32_PTR(pv), ("%p\n", (pv))) |
|---|
| 1953 | | |
|---|
| 1954 | | __BEGIN_DECLS |
|---|
| 1955 | | |
|---|
| 1956 | | /** |
|---|
| 1957 | | * The 1st part of an assert message. |
|---|
| 1958 | | * |
|---|
| 1959 | | * @param pszExpr Expression. Can be NULL. |
|---|
| 1960 | | * @param uLine Location line number. |
|---|
| 1961 | | * @param pszFile Location file name. |
|---|
| 1962 | | * @param pszFunction Location function name. |
|---|
| 1963 | | * @remark This API exists in HC Ring-3 and GC. |
|---|
| 1964 | | */ |
|---|
| 1965 | | RTDECL(void) AssertMsg1(const char *pszExpr, unsigned uLine, const char *pszFile, const char *pszFunction); |
|---|
| 1966 | | |
|---|
| 1967 | | /** |
|---|
| 1968 | | * The 2nd (optional) part of an assert message. |
|---|
| 1969 | | * @param pszFormat Printf like format string. |
|---|
| 1970 | | * @param ... Arguments to that string. |
|---|
| 1971 | | * @remark This API exists in HC Ring-3 and GC. |
|---|
| 1972 | | */ |
|---|
| 1973 | | RTDECL(void) AssertMsg2(const char *pszFormat, ...); |
|---|
| 1974 | | |
|---|
| 1975 | | /** |
|---|
| 1976 | | * Overridable function that decides whether assertions executes the breakpoint or not. |
|---|
| 1977 | | * |
|---|
| 1978 | | * The generic implementation will return true. |
|---|
| 1979 | | * |
|---|
| 1980 | | * @returns true if the breakpoint should be hit, false if it should be ignored. |
|---|
| 1981 | | * @remark The RTDECL() makes this a bit difficult to override on windows. Sorry. |
|---|
| 1982 | | */ |
|---|
| 1983 | | RTDECL(bool) RTAssertDoBreakpoint(void); |
|---|
| 1984 | | |
|---|
| 1985 | | /** The last assert message, 1st part. */ |
|---|
| 1986 | | extern RTDATADECL(char) g_szRTAssertMsg1[1024]; |
|---|
| 1987 | | /** The last assert message, 2nd part. */ |
|---|
| 1988 | | extern RTDATADECL(char) g_szRTAssertMsg2[2048]; |
|---|
| 1989 | | |
|---|
| 1990 | | __END_DECLS |
|---|
| | 1988 | * @param GCPhys The address (RTGCPHYS). |
|---|
| | 1989 | */ |
|---|
| | 1990 | #define AssertGCPhys32(GCPhys) AssertMsg(VALID_PHYS32(GCPhys), ("%RGp\n", (RTGCPHYS)(GCPhys))) |
|---|
| | 1991 | |
|---|