mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-03 14:10:33 +03:00
0030762: Foundation Classes - include backtrace within OSD_SIGSEGV
Standard_Failure now holds an optional stack trace dump. Added function Standard::StackTrace() dumping backtrace to the string. SegvHandler within OSD_signal now appends backtrace to the message if OSD::SignalStackTraceLength() is set to non-zero value or environment variable "CSF_DEBUG_MODE" is set for debugging. Added auxiliary macros Standard_NOINLINE disallowing function inlining. Command "dsetsignal" has been extended by -strackTraceLength argument for defining stack trace length within signals redirected to C++ exceptions. Added "ddebugtraces" command for debugging purposes (adding stack traces to all exceptions).
This commit is contained in:
@@ -32,7 +32,9 @@ class C1 : public C2 { \
|
||||
void Throw () const Standard_OVERRIDE { throw *this; } \
|
||||
public: \
|
||||
C1() : C2() {} \
|
||||
C1(const Standard_CString theMessage) : C2(theMessage) {} \
|
||||
C1(Standard_CString theMessage) : C2(theMessage) {} \
|
||||
C1(Standard_CString theMessage, Standard_CString theStackTrace) \
|
||||
: C2 (theMessage, theStackTrace) {} \
|
||||
static void Raise(const Standard_CString theMessage = "") { \
|
||||
Handle(C1) _E = new C1; \
|
||||
_E->Reraise(theMessage); \
|
||||
@@ -41,7 +43,8 @@ public: \
|
||||
Handle(C1) _E = new C1; \
|
||||
_E->Reraise (theMessage); \
|
||||
} \
|
||||
static Handle(C1) NewInstance(const Standard_CString theMessage = "") { return new C1(theMessage); } \
|
||||
static Handle(C1) NewInstance(Standard_CString theMessage = "") { return new C1(theMessage); } \
|
||||
static Handle(C1) NewInstance(Standard_CString theMessage, Standard_CString theStackTrace) { return new C1(theMessage, theStackTrace); } \
|
||||
DEFINE_STANDARD_RTTI_INLINE(C1,C2) \
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user