Pixar Arch 0.25.8
Loading...
Searching...
No Matches
debugger.h
Go to the documentation of this file.
1// Copyright 2016 Pixar
2//
3// Licensed under the terms set forth in the LICENSE.txt file available at
4// https://openusd.org/license.
5//
6// Modified by Jeremy Retailleau.
7
8#ifndef PXR_ARCH_DEBUGGER_H
9#define PXR_ARCH_DEBUGGER_H
10
13
14#include "pxr/arch/pxr.h"
15#include "pxr/arch/api.h"
16#include "pxr/arch/attributes.h"
17
18ARCH_NAMESPACE_OPEN_SCOPE
19
42ARCH_API
44
52ARCH_API
53void ArchDebuggerWait(bool wait);
54
64ARCH_API
66
70ARCH_API
72
77[[noreturn]]
78ARCH_API
79void ArchAbort(bool logging = true);
80
87#if defined(ARCH_COMPILER_GCC) || defined(ARCH_COMPILER_CLANG)
88#define ARCH_DEBUGGER_TRAP do { ARCH_NS::ArchDebuggerTrap(); asm(""); } while (0)
89#else
90#define ARCH_DEBUGGER_TRAP do { ARCH_NS::ArchDebuggerTrap(); } while (0)
91#endif
92
93ARCH_NAMESPACE_CLOSE_SCOPE
94
95#endif // PXR_ARCH_DEBUGGER_H
Define function attributes.
#define ARCH_NOINLINE
Macro used to indicate that a function should never be inlined.
Definition attributes.h:59
bool ArchDebuggerIsAttached() ARCH_NOINLINE
Test if a debugger is attached.
void ArchAbort(bool logging=true)
Abort.
void ArchDebuggerTrap() ARCH_NOINLINE
Stop in a debugger.
bool ArchDebuggerAttach() ARCH_NOINLINE
Attach a debugger.
void ArchDebuggerWait(bool wait)
Cause debug traps to wait for the debugger or not.