Pixar Arch
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 "./api.h"
15#include "./attributes.h"
16
17namespace pxr {
18
41ARCH_API
43
51ARCH_API
52void ArchDebuggerWait(bool wait);
53
63ARCH_API
65
69ARCH_API
71
76[[noreturn]]
77ARCH_API
78void ArchAbort(bool logging = true);
79
86#if defined(ARCH_COMPILER_GCC) || defined(ARCH_COMPILER_CLANG)
87#define ARCH_DEBUGGER_TRAP do { pxr::ArchDebuggerTrap(); asm(""); } while (0)
88#else
89#define ARCH_DEBUGGER_TRAP do { pxr::ArchDebuggerTrap(); } while (0)
90#endif
91
92} // namespace pxr
93
94#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:58
ARCH_API void ArchDebuggerWait(bool wait)
Cause debug traps to wait for the debugger or not.
ARCH_API bool ArchDebuggerAttach() ARCH_NOINLINE
Attach a debugger.
ARCH_API void ArchDebuggerTrap() ARCH_NOINLINE
Stop in a debugger.
ARCH_API void ArchAbort(bool logging=true)
Abort.
ARCH_API bool ArchDebuggerIsAttached() ARCH_NOINLINE
Test if a debugger is attached.