76 lines
3.0 KiB
Diff
76 lines
3.0 KiB
Diff
--- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/base/debug/stack_trace_posix.cc
|
|
+++ qt6-webengine-6.4.2/src/3rdparty/chromium/base/debug/stack_trace_posix.cc
|
|
@@ -30,7 +30,7 @@
|
|
#if !defined(USE_SYMBOLIZE)
|
|
#include <cxxabi.h>
|
|
#endif
|
|
-#if !defined(__UCLIBC__) && !defined(_AIX)
|
|
+#if defined(__GLIBC__) && !defined(_AIX)
|
|
#include <execinfo.h>
|
|
#endif
|
|
|
|
@@ -97,7 +97,7 @@ void DemangleSymbols(std::string* text)
|
|
// Note: code in this function is NOT async-signal safe (std::string uses
|
|
// malloc internally).
|
|
|
|
-#if !defined(__UCLIBC__) && !defined(_AIX)
|
|
+#if defined(__GLIBC__) && !defined(_AIX)
|
|
std::string::size_type search_from = 0;
|
|
while (search_from < text->size()) {
|
|
// Look for the start of a mangled symbol, from search_from.
|
|
@@ -144,7 +144,7 @@ class BacktraceOutputHandler {
|
|
virtual ~BacktraceOutputHandler() = default;
|
|
};
|
|
|
|
-#if !defined(__UCLIBC__) && !defined(_AIX)
|
|
+#if defined(__GLIBC__) && !defined(_AIX)
|
|
void OutputPointer(void* pointer, BacktraceOutputHandler* handler) {
|
|
// This should be more than enough to store a 64-bit number in hex:
|
|
// 16 hex digits + 1 for null-terminator.
|
|
@@ -868,7 +868,7 @@ size_t CollectStackTrace(void** trace, s
|
|
// If we do not have unwind tables, then try tracing using frame pointers.
|
|
return base::debug::TraceStackFramePointers(const_cast<const void**>(trace),
|
|
count, 0);
|
|
-#elif !defined(__UCLIBC__) && !defined(_AIX)
|
|
+#elif defined(__GLIBC__) && !defined(_AIX)
|
|
// Though the backtrace API man page does not list any possible negative
|
|
// return values, we take no chance.
|
|
return base::saturated_cast<size_t>(backtrace(trace, count));
|
|
@@ -881,13 +881,13 @@ void StackTrace::PrintWithPrefix(const c
|
|
// NOTE: This code MUST be async-signal safe (it's used by in-process
|
|
// stack dumping signal handler). NO malloc or stdio is allowed here.
|
|
|
|
-#if !defined(__UCLIBC__) && !defined(_AIX)
|
|
+#if defined(__GLIBC__) && !defined(_AIX)
|
|
PrintBacktraceOutputHandler handler;
|
|
ProcessBacktrace(trace_, count_, prefix_string, &handler);
|
|
#endif
|
|
}
|
|
|
|
-#if !defined(__UCLIBC__) && !defined(_AIX)
|
|
+#if defined(__GLIBC__) && !defined(_AIX)
|
|
void StackTrace::OutputToStreamWithPrefix(std::ostream* os,
|
|
const char* prefix_string) const {
|
|
StreamBacktraceOutputHandler handler(os);
|
|
--- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/v8/src/codegen/external-reference-table.cc
|
|
+++ qt6-webengine-6.4.2/src/3rdparty/chromium/v8/src/codegen/external-reference-table.cc
|
|
@@ -12,7 +12,9 @@
|
|
|
|
#if defined(DEBUG) && defined(V8_OS_LINUX) && !defined(V8_OS_ANDROID)
|
|
#define SYMBOLIZE_FUNCTION
|
|
+#if defined(__GLIBC__)
|
|
#include <execinfo.h>
|
|
+#endif
|
|
|
|
#include <vector>
|
|
|
|
@@ -103,7 +105,7 @@ void ExternalReferenceTable::Init(Isolat
|
|
}
|
|
|
|
const char* ExternalReferenceTable::ResolveSymbol(void* address) {
|
|
-#ifdef SYMBOLIZE_FUNCTION
|
|
+#if defined(SYMBOLIZE_FUNCTION) && defined(__GLIBC__)
|
|
char** names = backtrace_symbols(&address, 1);
|
|
const char* name = names[0];
|
|
// The array of names is malloc'ed. However, each name string is static
|