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

Unified Diff: sandbox/linux/seccomp/debug.h

Issue 3225010: Pull seccomp-sandbox in via DEPS rather than using an in-tree copy... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sandbox/linux/seccomp/clone.cc ('k') | sandbox/linux/seccomp/debug.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/linux/seccomp/debug.h
===================================================================
--- sandbox/linux/seccomp/debug.h (revision 57969)
+++ sandbox/linux/seccomp/debug.h (working copy)
@@ -1,80 +0,0 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef DEBUG_H__
-#define DEBUG_H__
-
-#include <map>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string>
-#include <string.h>
-
-#include "sandbox_impl.h"
-
-namespace playground {
-
-class Debug {
- public:
- // If debugging is enabled, write a message to stderr.
- static void message(const char* msg)
- #ifndef NDEBUG
- asm("playground$debugMessage")
- #if defined(__x86_64__)
- __attribute__((visibility("internal")))
- #endif
- ;
- #else
- { }
- #endif
-
- // If debugging is enabled, write the name of the syscall and an optional
- // message to stderr.
- static void syscall(long long* tm, int sysnum,
- const char* msg, int call = -1)
- #ifndef NDEBUG
- ;
- #else
- { }
- #endif
-
- // Print how much wall-time has elapsed since the last call to syscall()
- static void elapsed(long long tm, int sysnum, int call = -1)
- #ifndef NDEBUG
- ;
- #else
- {
- }
- #endif
-
- // Check whether debugging is enabled.
- static bool isEnabled() {
- #ifndef NDEBUG
- return enabled_;
- #else
- return false;
- #endif
- }
-
- private:
- #ifndef NDEBUG
- Debug();
- static bool enter();
- static bool leave();
- static void _message(const char* msg);
- static void gettimeofday(long long* tm);
- static char* itoa(char* s, int n);
-
- static Debug debug_;
-
- static bool enabled_;
- static int numSyscallNames_;
- static const char **syscallNames_;
- static std::map<int, std::string> syscallNamesMap_;
- #endif
-};
-
-} // namespace
-
-#endif // DEBUG_H__
« no previous file with comments | « sandbox/linux/seccomp/clone.cc ('k') | sandbox/linux/seccomp/debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698