blob: a7db58981bf9a1363f3b842a839ba5a7f20fcef8 [file] [log] [blame]
James Robinson74f9f1f2014-11-04 11:17:49 -08001// Copyright 2014 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
Julien Tinnes933cbf12015-09-24 12:25:13 -07005#include <string>
6
James Robinson7b766f42015-02-06 15:14:04 -08007#include "sandbox/linux/bpf_dsl/codegen.h"
James Robinson74f9f1f2014-11-04 11:17:49 -08008#include "sandbox/sandbox_export.h"
9
10namespace sandbox {
11namespace bpf_dsl {
12
13class SANDBOX_EXPORT DumpBPF {
14 public:
15 // PrintProgram writes |program| in a human-readable format to stderr.
16 static void PrintProgram(const CodeGen::Program& program);
Julien Tinnes933cbf12015-09-24 12:25:13 -070017
18 // StringPrintProgram writes |program| in a human-readable format to
19 // a std::string.
20 static std::string StringPrintProgram(const CodeGen::Program& program);
James Robinson74f9f1f2014-11-04 11:17:49 -080021};
22
23} // namespace bpf_dsl
24} // namespace sandbox