summaryrefslogtreecommitdiff
path: root/absl/debugging
diff options
context:
space:
mode:
authorGravatar Abseil Team <absl-team@google.com>2019-12-12 10:36:03 -0800
committerGravatar Matt Calabrese <calabrese@x.team>2019-12-12 15:37:13 -0500
commit12bc53e0318d80569270a5b26ccbc62b52022b89 (patch)
tree703f7dd5e7fdea7db3eefe317b10b1f67ddd8212 /absl/debugging
parent1e39f8626a4dadec1f56920b999dd4c3cfae333e (diff)
Export of internal Abseil changes
-- c99f979ad34f155fbeeea69b88bdc7458d89a21c by Derek Mauro <dmauro@google.com>: Remove a floating point division by zero test. This isn't testing behavior related to the library, and MSVC warns about it in opt mode. PiperOrigin-RevId: 285220804 -- 68b015491f0dbf1ab547994673281abd1f34cd4b by Gennadiy Rozental <rogeeff@google.com>: This CL introduces following changes to the class FlagImpl: * We eliminate the CommandLineFlagLocks struct. Instead callback guard and callback function are combined into a single CallbackData struct, while primary data lock is stored separately. * CallbackData member of class FlagImpl is initially set to be nullptr and is only allocated and initialized when a flag's callback is being set. For most flags we do not pay for the extra space and extra absl::Mutex now. * Primary data guard is stored in data_guard_ data member. This is a properly aligned character buffer of necessary size. During initialization of the flag we construct absl::Mutex in this space using placement new call. * We now avoid extra value copy after successful attempt to parse value out of string. Instead we swap flag's current value with tentative value we just produced. PiperOrigin-RevId: 285132636 -- ed45d118fb818969eb13094cf7827c885dfc562c by Tom Manshreck <shreck@google.com>: Change null-term* (and nul-term*) to NUL-term* in comments PiperOrigin-RevId: 285036610 -- 729619017944db895ce8d6d29c1995aa2e5628a5 by Derek Mauro <dmauro@google.com>: Use the Posix implementation of thread identity on MinGW. Some versions of MinGW suffer from thread_local bugs. PiperOrigin-RevId: 285022920 -- 39a25493503c76885bc3254c28f66a251c5b5bb0 by Greg Falcon <gfalcon@google.com>: Implementation detail change. Add further ABSL_NAMESPACE_BEGIN and _END annotation macros to files in Abseil. PiperOrigin-RevId: 285012012 GitOrigin-RevId: c99f979ad34f155fbeeea69b88bdc7458d89a21c Change-Id: I4c85d3704e45d11a9ac50d562f39640a6adbedc1
Diffstat (limited to 'absl/debugging')
-rw-r--r--absl/debugging/BUILD.bazel18
-rw-r--r--absl/debugging/CMakeLists.txt6
-rw-r--r--absl/debugging/failure_signal_handler.cc2
-rw-r--r--absl/debugging/failure_signal_handler.h4
-rw-r--r--absl/debugging/internal/address_is_readable.cc4
-rw-r--r--absl/debugging/internal/address_is_readable.h4
-rw-r--r--absl/debugging/internal/demangle.cc2
-rw-r--r--absl/debugging/internal/demangle.h4
-rw-r--r--absl/debugging/internal/demangle_test.cc2
-rw-r--r--absl/debugging/internal/elf_mem_image.cc2
-rw-r--r--absl/debugging/internal/elf_mem_image.h4
-rw-r--r--absl/debugging/internal/examine_stack.cc2
-rw-r--r--absl/debugging/internal/examine_stack.h4
-rw-r--r--absl/debugging/internal/stack_consumption.cc2
-rw-r--r--absl/debugging/internal/stack_consumption.h4
-rw-r--r--absl/debugging/internal/stack_consumption_test.cc2
-rw-r--r--absl/debugging/internal/stacktrace_aarch64-inl.inc2
-rw-r--r--absl/debugging/internal/stacktrace_arm-inl.inc2
-rw-r--r--absl/debugging/internal/stacktrace_generic-inl.inc2
-rw-r--r--absl/debugging/internal/stacktrace_powerpc-inl.inc2
-rw-r--r--absl/debugging/internal/stacktrace_unimplemented-inl.inc2
-rw-r--r--absl/debugging/internal/stacktrace_win32-inl.inc2
-rw-r--r--absl/debugging/internal/stacktrace_x86-inl.inc2
-rw-r--r--absl/debugging/internal/symbolize.h6
-rw-r--r--absl/debugging/internal/vdso_support.cc2
-rw-r--r--absl/debugging/internal/vdso_support.h2
-rw-r--r--absl/debugging/leak_check.cc4
-rw-r--r--absl/debugging/leak_check.h4
-rw-r--r--absl/debugging/stacktrace.cc2
-rw-r--r--absl/debugging/stacktrace.h4
-rw-r--r--absl/debugging/symbolize.h2
-rw-r--r--absl/debugging/symbolize_elf.inc2
-rw-r--r--absl/debugging/symbolize_unimplemented.inc2
-rw-r--r--absl/debugging/symbolize_win32.inc2
34 files changed, 111 insertions, 1 deletions
diff --git a/absl/debugging/BUILD.bazel b/absl/debugging/BUILD.bazel
index 2601090b..32cacefd 100644
--- a/absl/debugging/BUILD.bazel
+++ b/absl/debugging/BUILD.bazel
@@ -38,6 +38,7 @@ cc_library(
linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [
":debugging_internal",
+ "//absl/base:config",
"//absl/base:core_headers",
],
)
@@ -63,6 +64,7 @@ cc_library(
":debugging_internal",
":demangle_internal",
"//absl/base",
+ "//absl/base:config",
"//absl/base:core_headers",
"//absl/base:dynamic_annotations",
"//absl/base:malloc_internal",
@@ -106,6 +108,7 @@ cc_library(
deps = [
":stacktrace",
":symbolize",
+ "//absl/base:config",
"//absl/base:core_headers",
"//absl/base:raw_logging_internal",
],
@@ -168,6 +171,7 @@ cc_library(
copts = ABSL_DEFAULT_COPTS,
linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [
+ "//absl/base:config",
"//absl/base:core_headers",
"//absl/base:dynamic_annotations",
"//absl/base:raw_logging_internal",
@@ -181,6 +185,7 @@ cc_library(
copts = ABSL_DEFAULT_COPTS,
deps = [
"//absl/base",
+ "//absl/base:config",
"//absl/base:core_headers",
],
)
@@ -205,7 +210,10 @@ cc_library(
srcs = ["leak_check.cc"],
hdrs = ["leak_check.h"],
linkopts = ABSL_DEFAULT_LINKOPTS,
- deps = ["//absl/base:core_headers"],
+ deps = [
+ "//absl/base:config",
+ "//absl/base:core_headers",
+ ],
)
# Adding a dependency to leak_check_disable will disable
@@ -216,6 +224,7 @@ cc_library(
srcs = ["leak_check_disable.cc"],
linkopts = ABSL_DEFAULT_LINKOPTS,
linkstatic = 1,
+ deps = ["//absl/base:config"],
alwayslink = 1,
)
@@ -237,6 +246,9 @@ cc_library(
}),
linkopts = ABSL_DEFAULT_LINKOPTS,
visibility = ["//visibility:private"],
+ deps = [
+ "//absl/base:config",
+ ],
)
cc_library(
@@ -247,6 +259,9 @@ cc_library(
copts = ["-ULEAK_SANITIZER"],
linkopts = ABSL_DEFAULT_LINKOPTS,
visibility = ["//visibility:private"],
+ deps = [
+ "//absl/base:config",
+ ],
)
cc_test(
@@ -304,6 +319,7 @@ cc_library(
linkopts = ABSL_DEFAULT_LINKOPTS,
visibility = ["//visibility:private"],
deps = [
+ "//absl/base:config",
"//absl/base:core_headers",
"//absl/base:raw_logging_internal",
],
diff --git a/absl/debugging/CMakeLists.txt b/absl/debugging/CMakeLists.txt
index eff504b4..ef9e71fc 100644
--- a/absl/debugging/CMakeLists.txt
+++ b/absl/debugging/CMakeLists.txt
@@ -25,6 +25,7 @@ absl_cc_library(
${ABSL_DEFAULT_COPTS}
DEPS
absl::debugging_internal
+ absl::config
absl::core_headers
PUBLIC
)
@@ -49,6 +50,7 @@ absl_cc_library(
absl::debugging_internal
absl::demangle_internal
absl::base
+ absl::config
absl::core_headers
absl::dynamic_annotations
absl::malloc_internal
@@ -88,6 +90,7 @@ absl_cc_library(
DEPS
absl::stacktrace
absl::symbolize
+ absl::config
absl::core_headers
absl::raw_logging_internal
)
@@ -151,6 +154,7 @@ absl_cc_library(
${ABSL_DEFAULT_COPTS}
DEPS
absl::core_headers
+ absl::config
absl::dynamic_annotations
absl::raw_logging_internal
)
@@ -196,6 +200,7 @@ absl_cc_library(
COPTS
${ABSL_DEFAULT_COPTS}
DEPS
+ absl::config
absl::core_headers
PUBLIC
)
@@ -293,6 +298,7 @@ absl_cc_library(
COPTS
${ABSL_DEFAULT_COPTS}
DEPS
+ absl::config
absl::core_headers
absl::raw_logging_internal
TESTONLY
diff --git a/absl/debugging/failure_signal_handler.cc b/absl/debugging/failure_signal_handler.cc
index c6a4d962..470d6768 100644
--- a/absl/debugging/failure_signal_handler.cc
+++ b/absl/debugging/failure_signal_handler.cc
@@ -47,6 +47,7 @@
#endif
namespace absl {
+ABSL_NAMESPACE_BEGIN
ABSL_CONST_INIT static FailureSignalHandlerOptions fsh_options;
@@ -356,4 +357,5 @@ void InstallFailureSignalHandler(const FailureSignalHandlerOptions& options) {
}
}
+ABSL_NAMESPACE_END
} // namespace absl
diff --git a/absl/debugging/failure_signal_handler.h b/absl/debugging/failure_signal_handler.h
index 1beb78b9..f5a83962 100644
--- a/absl/debugging/failure_signal_handler.h
+++ b/absl/debugging/failure_signal_handler.h
@@ -44,7 +44,10 @@
#ifndef ABSL_DEBUGGING_FAILURE_SIGNAL_HANDLER_H_
#define ABSL_DEBUGGING_FAILURE_SIGNAL_HANDLER_H_
+#include "absl/base/config.h"
+
namespace absl {
+ABSL_NAMESPACE_BEGIN
// FailureSignalHandlerOptions
//
@@ -112,6 +115,7 @@ namespace debugging_internal {
const char* FailureSignalToString(int signo);
} // namespace debugging_internal
+ABSL_NAMESPACE_END
} // namespace absl
#endif // ABSL_DEBUGGING_FAILURE_SIGNAL_HANDLER_H_
diff --git a/absl/debugging/internal/address_is_readable.cc b/absl/debugging/internal/address_is_readable.cc
index 99c4c64b..f45e59b3 100644
--- a/absl/debugging/internal/address_is_readable.cc
+++ b/absl/debugging/internal/address_is_readable.cc
@@ -20,12 +20,14 @@
#if !defined(__linux__) || defined(__ANDROID__)
namespace absl {
+ABSL_NAMESPACE_BEGIN
namespace debugging_internal {
// On platforms other than Linux, just return true.
bool AddressIsReadable(const void* /* addr */) { return true; }
} // namespace debugging_internal
+ABSL_NAMESPACE_END
} // namespace absl
#else
@@ -40,6 +42,7 @@ bool AddressIsReadable(const void* /* addr */) { return true; }
#include "absl/base/internal/raw_logging.h"
namespace absl {
+ABSL_NAMESPACE_BEGIN
namespace debugging_internal {
// Pack a pid and two file descriptors into a 64-bit word,
@@ -128,6 +131,7 @@ bool AddressIsReadable(const void *addr) {
}
} // namespace debugging_internal
+ABSL_NAMESPACE_END
} // namespace absl
#endif
diff --git a/absl/debugging/internal/address_is_readable.h b/absl/debugging/internal/address_is_readable.h
index ca8003e6..4bbaf4d6 100644
--- a/absl/debugging/internal/address_is_readable.h
+++ b/absl/debugging/internal/address_is_readable.h
@@ -15,7 +15,10 @@
#ifndef ABSL_DEBUGGING_INTERNAL_ADDRESS_IS_READABLE_H_
#define ABSL_DEBUGGING_INTERNAL_ADDRESS_IS_READABLE_H_
+#include "absl/base/config.h"
+
namespace absl {
+ABSL_NAMESPACE_BEGIN
namespace debugging_internal {
// Return whether the byte at *addr is readable, without faulting.
@@ -23,6 +26,7 @@ namespace debugging_internal {
bool AddressIsReadable(const void *addr);
} // namespace debugging_internal
+ABSL_NAMESPACE_END
} // namespace absl
#endif // ABSL_DEBUGGING_INTERNAL_ADDRESS_IS_READABLE_H_
diff --git a/absl/debugging/internal/demangle.cc b/absl/debugging/internal/demangle.cc
index 3809e496..fc615c3f 100644
--- a/absl/debugging/internal/demangle.cc
+++ b/absl/debugging/internal/demangle.cc
@@ -24,6 +24,7 @@
#include <limits>
namespace absl {
+ABSL_NAMESPACE_BEGIN
namespace debugging_internal {
typedef struct {
@@ -1890,4 +1891,5 @@ bool Demangle(const char *mangled, char *out, int out_size) {
}
} // namespace debugging_internal
+ABSL_NAMESPACE_END
} // namespace absl
diff --git a/absl/debugging/internal/demangle.h b/absl/debugging/internal/demangle.h
index 81bb0dfd..c314d9bc 100644
--- a/absl/debugging/internal/demangle.h
+++ b/absl/debugging/internal/demangle.h
@@ -53,7 +53,10 @@
#ifndef ABSL_DEBUGGING_INTERNAL_DEMANGLE_H_
#define ABSL_DEBUGGING_INTERNAL_DEMANGLE_H_
+#include "absl/base/config.h"
+
namespace absl {
+ABSL_NAMESPACE_BEGIN
namespace debugging_internal {
// Demangle `mangled`. On success, return true and write the
@@ -62,6 +65,7 @@ namespace debugging_internal {
bool Demangle(const char *mangled, char *out, int out_size);
} // namespace debugging_internal
+ABSL_NAMESPACE_END
} // namespace absl
#endif // ABSL_DEBUGGING_INTERNAL_DEMANGLE_H_
diff --git a/absl/debugging/internal/demangle_test.cc b/absl/debugging/internal/demangle_test.cc
index a68ce324..c6f1ce18 100644
--- a/absl/debugging/internal/demangle_test.cc
+++ b/absl/debugging/internal/demangle_test.cc
@@ -23,6 +23,7 @@
#include "absl/memory/memory.h"
namespace absl {
+ABSL_NAMESPACE_BEGIN
namespace debugging_internal {
namespace {
@@ -190,4 +191,5 @@ TEST(DemangleRegression, DeeplyNestedArrayType) {
} // namespace
} // namespace debugging_internal
+ABSL_NAMESPACE_END
} // namespace absl
diff --git a/absl/debugging/internal/elf_mem_image.cc b/absl/debugging/internal/elf_mem_image.cc
index e7408bca..24cc0130 100644
--- a/absl/debugging/internal/elf_mem_image.cc
+++ b/absl/debugging/internal/elf_mem_image.cc
@@ -38,6 +38,7 @@
#define VERSYM_VERSION 0x7fff
namespace absl {
+ABSL_NAMESPACE_BEGIN
namespace debugging_internal {
namespace {
@@ -375,6 +376,7 @@ void ElfMemImage::SymbolIterator::Update(int increment) {
}
} // namespace debugging_internal
+ABSL_NAMESPACE_END
} // namespace absl
#endif // ABSL_HAVE_ELF_MEM_IMAGE
diff --git a/absl/debugging/internal/elf_mem_image.h b/absl/debugging/internal/elf_mem_image.h
index d84200db..46bfade3 100644
--- a/absl/debugging/internal/elf_mem_image.h
+++ b/absl/debugging/internal/elf_mem_image.h
@@ -23,6 +23,8 @@
// used.
#include <climits>
+#include "absl/base/config.h"
+
// Maybe one day we can rewrite this file not to require the elf
// symbol extensions in glibc, but for right now we need them.
#ifdef ABSL_HAVE_ELF_MEM_IMAGE
@@ -39,6 +41,7 @@
#include <link.h> // for ElfW
namespace absl {
+ABSL_NAMESPACE_BEGIN
namespace debugging_internal {
// An in-memory ELF image (may not exist on disk).
@@ -123,6 +126,7 @@ class ElfMemImage {
};
} // namespace debugging_internal
+ABSL_NAMESPACE_END
} // namespace absl
#endif // ABSL_HAVE_ELF_MEM_IMAGE
diff --git a/absl/debugging/internal/examine_stack.cc b/absl/debugging/internal/examine_stack.cc
index 1ebc788f..22f41b46 100644
--- a/absl/debugging/internal/examine_stack.cc
+++ b/absl/debugging/internal/examine_stack.cc
@@ -30,6 +30,7 @@
#include "absl/debugging/symbolize.h"
namespace absl {
+ABSL_NAMESPACE_BEGIN
namespace debugging_internal {
// Returns the program counter from signal context, nullptr if
@@ -150,4 +151,5 @@ void DumpPCAndFrameSizesAndStackTrace(
}
} // namespace debugging_internal
+ABSL_NAMESPACE_END
} // namespace absl
diff --git a/absl/debugging/internal/examine_stack.h b/absl/debugging/internal/examine_stack.h
index 56c9763e..39336913 100644
--- a/absl/debugging/internal/examine_stack.h
+++ b/absl/debugging/internal/examine_stack.h
@@ -17,7 +17,10 @@
#ifndef ABSL_DEBUGGING_INTERNAL_EXAMINE_STACK_H_
#define ABSL_DEBUGGING_INTERNAL_EXAMINE_STACK_H_
+#include "absl/base/config.h"
+
namespace absl {
+ABSL_NAMESPACE_BEGIN
namespace debugging_internal {
// Returns the program counter from signal context, or nullptr if
@@ -33,6 +36,7 @@ void DumpPCAndFrameSizesAndStackTrace(
void (*writerfn)(const char*, void*), void* writerfn_arg);
} // namespace debugging_internal
+ABSL_NAMESPACE_END
} // namespace absl
#endif // ABSL_DEBUGGING_INTERNAL_EXAMINE_STACK_H_
diff --git a/absl/debugging/internal/stack_consumption.cc b/absl/debugging/internal/stack_consumption.cc
index d4703264..875ca6d9 100644
--- a/absl/debugging/internal/stack_consumption.cc
+++ b/absl/debugging/internal/stack_consumption.cc
@@ -27,6 +27,7 @@
#include "absl/base/internal/raw_logging.h"
namespace absl {
+ABSL_NAMESPACE_BEGIN
namespace debugging_internal {
namespace {
@@ -177,6 +178,7 @@ int GetSignalHandlerStackConsumption(void (*signal_handler)(int)) {
}
} // namespace debugging_internal
+ABSL_NAMESPACE_END
} // namespace absl
#endif // ABSL_INTERNAL_HAVE_DEBUGGING_STACK_CONSUMPTION
diff --git a/absl/debugging/internal/stack_consumption.h b/absl/debugging/internal/stack_consumption.h
index b860a3c1..5e60ec42 100644
--- a/absl/debugging/internal/stack_consumption.h
+++ b/absl/debugging/internal/stack_consumption.h
@@ -18,6 +18,8 @@
#ifndef ABSL_DEBUGGING_INTERNAL_STACK_CONSUMPTION_H_
#define ABSL_DEBUGGING_INTERNAL_STACK_CONSUMPTION_H_
+#include "absl/base/config.h"
+
// The code in this module is not portable.
// Use this feature test macro to detect its availability.
#ifdef ABSL_INTERNAL_HAVE_DEBUGGING_STACK_CONSUMPTION
@@ -27,6 +29,7 @@
#define ABSL_INTERNAL_HAVE_DEBUGGING_STACK_CONSUMPTION 1
namespace absl {
+ABSL_NAMESPACE_BEGIN
namespace debugging_internal {
// Returns the stack consumption in bytes for the code exercised by
@@ -38,6 +41,7 @@ namespace debugging_internal {
int GetSignalHandlerStackConsumption(void (*signal_handler)(int));
} // namespace debugging_internal
+ABSL_NAMESPACE_END
} // namespace absl
#endif // ABSL_INTERNAL_HAVE_DEBUGGING_STACK_CONSUMPTION
diff --git a/absl/debugging/internal/stack_consumption_test.cc b/absl/debugging/internal/stack_consumption_test.cc
index 68bfa126..80445bf4 100644
--- a/absl/debugging/internal/stack_consumption_test.cc
+++ b/absl/debugging/internal/stack_consumption_test.cc
@@ -23,6 +23,7 @@
#include "absl/base/internal/raw_logging.h"
namespace absl {
+ABSL_NAMESPACE_BEGIN
namespace debugging_internal {
namespace {
@@ -43,6 +44,7 @@ TEST(SignalHandlerStackConsumptionTest, MeasuresStackConsumption) {
} // namespace
} // namespace debugging_internal
+ABSL_NAMESPACE_END
} // namespace absl
#endif // ABSL_INTERNAL_HAVE_DEBUGGING_STACK_CONSUMPTION
diff --git a/absl/debugging/internal/stacktrace_aarch64-inl.inc b/absl/debugging/internal/stacktrace_aarch64-inl.inc
index 7ed6b3eb..411ea308 100644
--- a/absl/debugging/internal/stacktrace_aarch64-inl.inc
+++ b/absl/debugging/internal/stacktrace_aarch64-inl.inc
@@ -180,11 +180,13 @@ static int UnwindImpl(void** result, int* sizes, int max_depth, int skip_count,
}
namespace absl {
+ABSL_NAMESPACE_BEGIN
namespace debugging_internal {
bool StackTraceWorksForTest() {
return true;
}
} // namespace debugging_internal
+ABSL_NAMESPACE_END
} // namespace absl
#endif // ABSL_DEBUGGING_INTERNAL_STACKTRACE_AARCH64_INL_H_
diff --git a/absl/debugging/internal/stacktrace_arm-inl.inc b/absl/debugging/internal/stacktrace_arm-inl.inc
index c8408337..fffda968 100644
--- a/absl/debugging/internal/stacktrace_arm-inl.inc
+++ b/absl/debugging/internal/stacktrace_arm-inl.inc
@@ -113,11 +113,13 @@ static int UnwindImpl(void** result, int* sizes, int max_depth, int skip_count,
}
namespace absl {
+ABSL_NAMESPACE_BEGIN
namespace debugging_internal {
bool StackTraceWorksForTest() {
return false;
}
} // namespace debugging_internal
+ABSL_NAMESPACE_END
} // namespace absl
#endif // ABSL_DEBUGGING_INTERNAL_STACKTRACE_ARM_INL_H_
diff --git a/absl/debugging/internal/stacktrace_generic-inl.inc b/absl/debugging/internal/stacktrace_generic-inl.inc
index 81a49ef2..ac034c9f 100644
--- a/absl/debugging/internal/stacktrace_generic-inl.inc
+++ b/absl/debugging/internal/stacktrace_generic-inl.inc
@@ -87,11 +87,13 @@ static int UnwindImpl(void** result, int* sizes, int max_depth, int skip_count,
}
namespace absl {
+ABSL_NAMESPACE_BEGIN
namespace debugging_internal {
bool StackTraceWorksForTest() {
return true;
}
} // namespace debugging_internal
+ABSL_NAMESPACE_END
} // namespace absl
#endif // ABSL_DEBUGGING_INTERNAL_STACKTRACE_GENERIC_INL_H_
diff --git a/absl/debugging/internal/stacktrace_powerpc-inl.inc b/absl/debugging/internal/stacktrace_powerpc-inl.inc
index 3a070ee4..2e7c2f40 100644
--- a/absl/debugging/internal/stacktrace_powerpc-inl.inc
+++ b/absl/debugging/internal/stacktrace_powerpc-inl.inc
@@ -236,11 +236,13 @@ static int UnwindImpl(void** result, int* sizes, int max_depth, int skip_count,
}
namespace absl {
+ABSL_NAMESPACE_BEGIN
namespace debugging_internal {
bool StackTraceWorksForTest() {
return true;
}
} // namespace debugging_internal
+ABSL_NAMESPACE_END
} // namespace absl
#endif // ABSL_DEBUGGING_INTERNAL_STACKTRACE_POWERPC_INL_H_
diff --git a/absl/debugging/internal/stacktrace_unimplemented-inl.inc b/absl/debugging/internal/stacktrace_unimplemented-inl.inc
index e256fdd4..5b8fb191 100644
--- a/absl/debugging/internal/stacktrace_unimplemented-inl.inc
+++ b/absl/debugging/internal/stacktrace_unimplemented-inl.inc
@@ -12,11 +12,13 @@ static int UnwindImpl(void** /* result */, int* /* sizes */,
}
namespace absl {
+ABSL_NAMESPACE_BEGIN
namespace debugging_internal {
bool StackTraceWorksForTest() {
return false;
}
} // namespace debugging_internal
+ABSL_NAMESPACE_END
} // namespace absl
#endif // ABSL_DEBUGGING_INTERNAL_STACKTRACE_UNIMPLEMENTED_INL_H_
diff --git a/absl/debugging/internal/stacktrace_win32-inl.inc b/absl/debugging/internal/stacktrace_win32-inl.inc
index 247e7428..9c2c5580 100644
--- a/absl/debugging/internal/stacktrace_win32-inl.inc
+++ b/absl/debugging/internal/stacktrace_win32-inl.inc
@@ -73,11 +73,13 @@ static int UnwindImpl(void** result, int* sizes, int max_depth, int skip_count,
}
namespace absl {
+ABSL_NAMESPACE_BEGIN
namespace debugging_internal {
bool StackTraceWorksForTest() {
return false;
}
} // namespace debugging_internal
+ABSL_NAMESPACE_END
} // namespace absl
#endif // ABSL_DEBUGGING_INTERNAL_STACKTRACE_WIN32_INL_H_
diff --git a/absl/debugging/internal/stacktrace_x86-inl.inc b/absl/debugging/internal/stacktrace_x86-inl.inc
index 9494441e..972febdd 100644
--- a/absl/debugging/internal/stacktrace_x86-inl.inc
+++ b/absl/debugging/internal/stacktrace_x86-inl.inc
@@ -330,11 +330,13 @@ static int UnwindImpl(void **result, int *sizes, int max_depth, int skip_count,
}
namespace absl {
+ABSL_NAMESPACE_BEGIN
namespace debugging_internal {
bool StackTraceWorksForTest() {
return true;
}
} // namespace debugging_internal
+ABSL_NAMESPACE_END
} // namespace absl
#endif // ABSL_DEBUGGING_INTERNAL_STACKTRACE_X86_INL_INC_
diff --git a/absl/debugging/internal/symbolize.h b/absl/debugging/internal/symbolize.h
index 3e537893..5d0858b5 100644
--- a/absl/debugging/internal/symbolize.h
+++ b/absl/debugging/internal/symbolize.h
@@ -21,6 +21,8 @@
#include <cstddef>
#include <cstdint>
+#include "absl/base/config.h"
+
#ifdef ABSL_INTERNAL_HAVE_ELF_SYMBOLIZE
#error ABSL_INTERNAL_HAVE_ELF_SYMBOLIZE cannot be directly set
#elif defined(__ELF__) && defined(__GLIBC__) && !defined(__native_client__) && \
@@ -33,6 +35,7 @@
#include <string>
namespace absl {
+ABSL_NAMESPACE_BEGIN
namespace debugging_internal {
// Iterates over all sections, invoking callback on each with the section name
@@ -51,11 +54,13 @@ bool GetSectionHeaderByName(int fd, const char *name, size_t name_len,
ElfW(Shdr) *out);
} // namespace debugging_internal
+ABSL_NAMESPACE_END
} // namespace absl
#endif // ABSL_INTERNAL_HAVE_ELF_SYMBOLIZE
namespace absl {
+ABSL_NAMESPACE_BEGIN
namespace debugging_internal {
struct SymbolDecoratorArgs {
@@ -117,6 +122,7 @@ bool GetFileMappingHint(const void** start,
const char** filename);
} // namespace debugging_internal
+ABSL_NAMESPACE_END
} // namespace absl
#endif // ABSL_DEBUGGING_INTERNAL_SYMBOLIZE_H_
diff --git a/absl/debugging/internal/vdso_support.cc b/absl/debugging/internal/vdso_support.cc
index d13ef25d..1e8a78ac 100644
--- a/absl/debugging/internal/vdso_support.cc
+++ b/absl/debugging/internal/vdso_support.cc
@@ -38,6 +38,7 @@
#endif
namespace absl {
+ABSL_NAMESPACE_BEGIN
namespace debugging_internal {
ABSL_CONST_INIT
@@ -187,6 +188,7 @@ static class VDSOInitHelper {
} vdso_init_helper;
} // namespace debugging_internal
+ABSL_NAMESPACE_END
} // namespace absl
#endif // ABSL_HAVE_VDSO_SUPPORT
diff --git a/absl/debugging/internal/vdso_support.h b/absl/debugging/internal/vdso_support.h
index 9895b48d..6562c6c2 100644
--- a/absl/debugging/internal/vdso_support.h
+++ b/absl/debugging/internal/vdso_support.h
@@ -53,6 +53,7 @@
#endif
namespace absl {
+ABSL_NAMESPACE_BEGIN
namespace debugging_internal {
// NOTE: this class may be used from within tcmalloc, and can not
@@ -149,6 +150,7 @@ class VDSOSupport {
int GetCPU();
} // namespace debugging_internal
+ABSL_NAMESPACE_END
} // namespace absl
#endif // ABSL_HAVE_ELF_MEM_IMAGE
diff --git a/absl/debugging/leak_check.cc b/absl/debugging/leak_check.cc
index ffe3d1bd..ff904955 100644
--- a/absl/debugging/leak_check.cc
+++ b/absl/debugging/leak_check.cc
@@ -21,12 +21,14 @@
#ifndef LEAK_SANITIZER
namespace absl {
+ABSL_NAMESPACE_BEGIN
bool HaveLeakSanitizer() { return false; }
void DoIgnoreLeak(const void*) { }
void RegisterLivePointers(const void*, size_t) { }
void UnRegisterLivePointers(const void*, size_t) { }
LeakCheckDisabler::LeakCheckDisabler() { }
LeakCheckDisabler::~LeakCheckDisabler() { }
+ABSL_NAMESPACE_END
} // namespace absl
#else
@@ -34,6 +36,7 @@ LeakCheckDisabler::~LeakCheckDisabler() { }
#include <sanitizer/lsan_interface.h>
namespace absl {
+ABSL_NAMESPACE_BEGIN
bool HaveLeakSanitizer() { return true; }
void DoIgnoreLeak(const void* ptr) { __lsan_ignore_object(ptr); }
void RegisterLivePointers(const void* ptr, size_t size) {
@@ -44,6 +47,7 @@ void UnRegisterLivePointers(const void* ptr, size_t size) {
}
LeakCheckDisabler::LeakCheckDisabler() { __lsan_disable(); }
LeakCheckDisabler::~LeakCheckDisabler() { __lsan_enable(); }
+ABSL_NAMESPACE_END
} // namespace absl
#endif // LEAK_SANITIZER
diff --git a/absl/debugging/leak_check.h b/absl/debugging/leak_check.h
index 4d489c58..7a5a22dd 100644
--- a/absl/debugging/leak_check.h
+++ b/absl/debugging/leak_check.h
@@ -32,7 +32,10 @@
#include <cstddef>
+#include "absl/base/config.h"
+
namespace absl {
+ABSL_NAMESPACE_BEGIN
// HaveLeakSanitizer()
//
@@ -104,6 +107,7 @@ void RegisterLivePointers(const void* ptr, size_t size);
// `RegisterLivePointers()`, enabling leak checking of those pointers.
void UnRegisterLivePointers(const void* ptr, size_t size);
+ABSL_NAMESPACE_END
} // namespace absl
#endif // ABSL_DEBUGGING_LEAK_CHECK_H_
diff --git a/absl/debugging/stacktrace.cc b/absl/debugging/stacktrace.cc
index 9de8782f..1f7c7d82 100644
--- a/absl/debugging/stacktrace.cc
+++ b/absl/debugging/stacktrace.cc
@@ -57,6 +57,7 @@
#endif
namespace absl {
+ABSL_NAMESPACE_BEGIN
namespace {
typedef int (*Unwinder)(void**, int*, int, int, const void*, int*);
@@ -135,4 +136,5 @@ int DefaultStackUnwinder(void** pcs, int* sizes, int depth, int skip,
return n;
}
+ABSL_NAMESPACE_END
} // namespace absl
diff --git a/absl/debugging/stacktrace.h b/absl/debugging/stacktrace.h
index cd8fae76..0ec0ffda 100644
--- a/absl/debugging/stacktrace.h
+++ b/absl/debugging/stacktrace.h
@@ -31,7 +31,10 @@
#ifndef ABSL_DEBUGGING_STACKTRACE_H_
#define ABSL_DEBUGGING_STACKTRACE_H_
+#include "absl/base/config.h"
+
namespace absl {
+ABSL_NAMESPACE_BEGIN
// GetStackFrames()
//
@@ -222,6 +225,7 @@ namespace debugging_internal {
// working.
extern bool StackTraceWorksForTest();
} // namespace debugging_internal
+ABSL_NAMESPACE_END
} // namespace absl
#endif // ABSL_DEBUGGING_STACKTRACE_H_
diff --git a/absl/debugging/symbolize.h b/absl/debugging/symbolize.h
index a73dbd9e..a8ff3740 100644
--- a/absl/debugging/symbolize.h
+++ b/absl/debugging/symbolize.h
@@ -55,6 +55,7 @@
#include "absl/debugging/internal/symbolize.h"
namespace absl {
+ABSL_NAMESPACE_BEGIN
// InitializeSymbolizer()
//
@@ -92,6 +93,7 @@ void InitializeSymbolizer(const char* argv0);
// }
bool Symbolize(const void *pc, char *out, int out_size);
+ABSL_NAMESPACE_END
} // namespace absl
#endif // ABSL_DEBUGGING_SYMBOLIZE_H_
diff --git a/absl/debugging/symbolize_elf.inc b/absl/debugging/symbolize_elf.inc
index 14f0c972..c371635f 100644
--- a/absl/debugging/symbolize_elf.inc
+++ b/absl/debugging/symbolize_elf.inc
@@ -76,6 +76,7 @@
#include "absl/debugging/internal/vdso_support.h"
namespace absl {
+ABSL_NAMESPACE_BEGIN
// Value of argv[0]. Used by MaybeInitializeObjFile().
static char *argv0_value = nullptr;
@@ -1475,4 +1476,5 @@ bool Symbolize(const void *pc, char *out, int out_size) {
return ok;
}
+ABSL_NAMESPACE_END
} // namespace absl
diff --git a/absl/debugging/symbolize_unimplemented.inc b/absl/debugging/symbolize_unimplemented.inc
index 7c580fe4..db24456b 100644
--- a/absl/debugging/symbolize_unimplemented.inc
+++ b/absl/debugging/symbolize_unimplemented.inc
@@ -17,6 +17,7 @@
#include "absl/base/internal/raw_logging.h"
namespace absl {
+ABSL_NAMESPACE_BEGIN
namespace debugging_internal {
@@ -35,4 +36,5 @@ bool GetFileMappingHint(const void **, const void **, uint64_t *, const char **)
void InitializeSymbolizer(const char*) {}
bool Symbolize(const void *, char *, int) { return false; }
+ABSL_NAMESPACE_END
} // namespace absl
diff --git a/absl/debugging/symbolize_win32.inc b/absl/debugging/symbolize_win32.inc
index bd6fbd5e..c3df46f6 100644
--- a/absl/debugging/symbolize_win32.inc
+++ b/absl/debugging/symbolize_win32.inc
@@ -31,6 +31,7 @@
#include "absl/base/internal/raw_logging.h"
namespace absl {
+ABSL_NAMESPACE_BEGIN
static HANDLE process = NULL;
@@ -76,4 +77,5 @@ bool Symbolize(const void* pc, char* out, int out_size) {
return true;
}
+ABSL_NAMESPACE_END
} // namespace absl