Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(408)

Unified Diff: base/debug/stack_trace.h

Issue 11362048: GTTF: Make Linux stack dump signal handler async-signal safe. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: shess' comments Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/debug/debugger_posix.cc ('k') | base/debug/stack_trace_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/debug/stack_trace.h
diff --git a/base/debug/stack_trace.h b/base/debug/stack_trace.h
index 60d5821a7094293ad576bee730ed0569759c5272..42234ef91f378d8c927d2037cf5f3e7fbd4b2e88 100644
--- a/base/debug/stack_trace.h
+++ b/base/debug/stack_trace.h
@@ -73,6 +73,20 @@ class BASE_EXPORT StackTrace {
size_t count_;
};
+namespace internal {
+
+#if defined(OS_POSIX) && !defined(OS_ANDROID)
+// POSIX doesn't define any async-signal safe function for converting
+// an integer to ASCII. We'll have to define our own version.
+// itoa_r() converts a (signed) integer to ASCII. It returns "buf", if the
+// conversion was successful or NULL otherwise. It never writes more than "sz"
+// bytes. Output will be truncated as needed, and a NUL character is always
+// appended.
+BASE_EXPORT char *itoa_r(intptr_t i, char *buf, size_t sz, int base);
+#endif // defined(OS_POSIX) && !defined(OS_ANDROID)
+
+} // namespace internal
+
} // namespace debug
} // namespace base
« no previous file with comments | « base/debug/debugger_posix.cc ('k') | base/debug/stack_trace_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698