mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-04 22:07:27 +00:00
Unix/Signals.inc: Let findModulesAndOffsets() built conditionally regarding to (defined(HAVE_BACKTRACE) && defined(ENABLE_BACKTRACES)). [-Wunused-function]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219596 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
58c0f65bf2
commit
5adece02b6
@ -272,6 +272,8 @@ void llvm::sys::AddSignalHandler(void (*FnPtr)(void *), void *Cookie) {
|
|||||||
RegisterHandlers();
|
RegisterHandlers();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(HAVE_BACKTRACE) && defined(ENABLE_BACKTRACES)
|
||||||
|
|
||||||
#if HAVE_LINK_H && (defined(__linux__) || defined(__FreeBSD__) || \
|
#if HAVE_LINK_H && (defined(__linux__) || defined(__FreeBSD__) || \
|
||||||
defined(__FreeBSD_kernel__) || defined(__NetBSD__))
|
defined(__FreeBSD_kernel__) || defined(__NetBSD__))
|
||||||
struct DlIteratePhdrData {
|
struct DlIteratePhdrData {
|
||||||
@ -322,7 +324,6 @@ static bool findModulesAndOffsets(void **StackTrace, int Depth,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(HAVE_BACKTRACE) && defined(ENABLE_BACKTRACES)
|
|
||||||
static bool printSymbolizedStackTrace(void **StackTrace, int Depth, FILE *FD) {
|
static bool printSymbolizedStackTrace(void **StackTrace, int Depth, FILE *FD) {
|
||||||
// FIXME: Subtract necessary number from StackTrace entries to turn return addresses
|
// FIXME: Subtract necessary number from StackTrace entries to turn return addresses
|
||||||
// into actual instruction addresses.
|
// into actual instruction addresses.
|
||||||
@ -407,7 +408,7 @@ static bool printSymbolizedStackTrace(void **StackTrace, int Depth, FILE *FD) {
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
#endif
|
#endif // defined(HAVE_BACKTRACE) && defined(ENABLE_BACKTRACES)
|
||||||
|
|
||||||
// PrintStackTrace - In the case of a program crash or fault, print out a stack
|
// PrintStackTrace - In the case of a program crash or fault, print out a stack
|
||||||
// trace so that the user has an indication of why and where we died.
|
// trace so that the user has an indication of why and where we died.
|
||||||
|
Loading…
Reference in New Issue
Block a user