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

Side by Side Diff: third_party/crazy_linker/crazy_linker/src/crazy_linker_debug.h

Issue 23542017: This patch adds a new third-party library that implements an ELF dynamic linker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor update Created 7 years, 3 months 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CRAZY_LINKER_DEBUG_H
6 #define CRAZY_LINKER_DEBUG_H
7
8 // Set CRAZY_DEBUG on the command-line to 1 to enable debugging support.
9 // This really means adding traces that will be sent to both stderr
10 // and the logcat during execution.
11 #ifndef CRAZY_DEBUG
12 #define CRAZY_DEBUG 0
13 #endif
14
15 namespace crazy {
16
17 #if CRAZY_DEBUG
18
19 void Log(const char* fmt, ...);
20 void LogErrno(const char* fmt, ...);
21
22 #define LOG(...) ::crazy::Log(__VA_ARGS__)
23 #define LOG_ERRNO(...) ::crazy::LogErrno(__VA_ARGS__)
24
25 #else
26
27 #define LOG(...) ((void)0)
28 #define LOG_ERRNO(...) ((void)0)
29
30 #endif
31
32 // Conditional logging.
33 #define LOG_IF(cond, ...) \
34 do { if ((cond)) LOG(__VA_ARGS__); } while (0)
35
36 #define LOG_ERRNO_IF(cond, ...) \
37 do { if ((cond)) LOG_ERRNO(__VA_ARGS__); } while (0)
38
39 } // namespace crazy
40
41 #endif // CRAZY_LINKER_DEBUG_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698