Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QTest::CrashHandler Namespace Reference

Classes

class  FatalSignalHandler

Enumerations

enum  DebuggerProgram { None , Gdb , Lldb }

Functions

static void actionHandler (int signum, siginfo_t *info, void *)
bool alreadyDebugging ()
static bool hasSystemCrashReporter ()
void maybeDisableCoreDump ()
void prepareStackTrace ()
void printTestRunTime ()
static quintptr getProgramCounter (void *ucontext)
void generateStackTrace (quintptr ip)
void blockUnixSignals ()
static std::string_view unixSignalCodeToName (int signo, int code) noexcept
template<typename T>
static std::enable_if_t< sizeof(std::declval< T >().si_pid)+sizeof(std::declval< T >().si_uid) >=1 > printSentSignalInfo (T *info)
static void printSentSignalInfo (...)
template<typename T>
static std::enable_if_t< sizeof(std::declval< T >().si_addr) >=1 > printCrashingSignalInfo (T *info, quintptr pc)
static void printCrashingSignalInfo (...)
static void regularHandler (int signum)
static auto alternateStackSize () noexcept
static LONG WINAPI windowsFaultHandler (struct _EXCEPTION_POINTERS *exInfo)

Variables

static Q_CONSTINIT OldActionsArray oldActions {}
static bool pauseOnCrash = false
static DebuggerProgram debugger = None
static DebuggerProgram debugger = None

Enumeration Type Documentation

◆ DebuggerProgram

Enumerator
None 
Gdb 
Lldb 

Definition at line 30 of file qtestcrashhandler_p.h.

Function Documentation

◆ actionHandler()

void QTest::CrashHandler::actionHandler ( int signum,
siginfo_t * info,
void * ucontext )
static

Definition at line 785 of file qtestcrashhandler_unix.cpp.

References pauseOnCrash, printSentSignalInfo(), and printTestRunTime().

Referenced by regularHandler().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ alreadyDebugging()

bool QTest::CrashHandler::alreadyDebugging ( )

Definition at line 217 of file qtestcrashhandler_unix.cpp.

◆ alternateStackSize()

auto QTest::CrashHandler::alternateStackSize ( )
staticnoexcept

Definition at line 727 of file qtestcrashhandler_unix.cpp.

◆ blockUnixSignals()

void QTest::CrashHandler::blockUnixSignals ( )
inline

Definition at line 492 of file qtestcrashhandler_unix.cpp.

◆ generateStackTrace()

void QTest::CrashHandler::generateStackTrace ( quintptr ip = 0)

Definition at line 407 of file qtestcrashhandler_unix.cpp.

References debugger.

◆ getProgramCounter()

quintptr QTest::CrashHandler::getProgramCounter ( void * ucontext)
static

Definition at line 368 of file qtestcrashhandler_unix.cpp.

◆ hasSystemCrashReporter()

bool QTest::CrashHandler::hasSystemCrashReporter ( )
static

Definition at line 264 of file qtestcrashhandler_unix.cpp.

Referenced by prepareStackTrace().

Here is the caller graph for this function:

◆ maybeDisableCoreDump()

void QTest::CrashHandler::maybeDisableCoreDump ( )

Definition at line 273 of file qtestcrashhandler_unix.cpp.

◆ prepareStackTrace()

void QTest::CrashHandler::prepareStackTrace ( )

Definition at line 289 of file qtestcrashhandler_unix.cpp.

References hasSystemCrashReporter().

Here is the call graph for this function:

◆ printCrashingSignalInfo() [1/2]

void QTest::CrashHandler::printCrashingSignalInfo ( ...)
static

Definition at line 666 of file qtestcrashhandler_unix.cpp.

◆ printCrashingSignalInfo() [2/2]

template<typename T>
std::enable_if_t< sizeof(std::declval< T >().si_addr) >=1 > QTest::CrashHandler::printCrashingSignalInfo ( T * info,
quintptr pc )
static

Definition at line 653 of file qtestcrashhandler_unix.cpp.

◆ printSentSignalInfo() [1/2]

void QTest::CrashHandler::printSentSignalInfo ( ...)
static

Definition at line 650 of file qtestcrashhandler_unix.cpp.

Referenced by actionHandler().

Here is the caller graph for this function:

◆ printSentSignalInfo() [2/2]

template<typename T>
std::enable_if_t< sizeof(std::declval< T >().si_pid)+sizeof(std::declval< T >().si_uid) >=1 > QTest::CrashHandler::printSentSignalInfo ( T * info)
static

Definition at line 645 of file qtestcrashhandler_unix.cpp.

◆ printTestRunTime()

void QTest::CrashHandler::printTestRunTime ( )

Definition at line 358 of file qtestcrashhandler_unix.cpp.

Referenced by actionHandler().

Here is the caller graph for this function:

◆ regularHandler()

void QTest::CrashHandler::regularHandler ( int signum)
static

Definition at line 668 of file qtestcrashhandler_unix.cpp.

References actionHandler().

Here is the call graph for this function:

◆ unixSignalCodeToName()

std::string_view QTest::CrashHandler::unixSignalCodeToName ( int signo,
int code )
staticnoexcept

Definition at line 506 of file qtestcrashhandler_unix.cpp.

◆ windowsFaultHandler()

LONG WINAPI QTest::CrashHandler::windowsFaultHandler ( struct _EXCEPTION_POINTERS * exInfo)
static

Definition at line 185 of file qtestcrashhandler_win.cpp.

Variable Documentation

◆ debugger [1/2]

DebuggerProgram QTest::CrashHandler::debugger = None
static

Definition at line 288 of file qtestcrashhandler_unix.cpp.

Referenced by generateStackTrace().

◆ debugger [2/2]

DebuggerProgram QTest::CrashHandler::debugger = None
static

Definition at line 36 of file qtestcrashhandler_win.cpp.

◆ oldActions

Q_CONSTINIT OldActionsArray QTest::CrashHandler::oldActions {}
static

Definition at line 212 of file qtestcrashhandler_unix.cpp.

◆ pauseOnCrash

bool QTest::CrashHandler::pauseOnCrash = false
static

Definition at line 213 of file qtestcrashhandler_unix.cpp.

Referenced by actionHandler().