James Robinson | 74f9f1f | 2014-11-04 11:17:49 -0800 | [diff] [blame] | 1 | // 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 Tinnes | 933cbf1 | 2015-09-24 12:25:13 -0700 | [diff] [blame] | 5 | #include <string> |
| 6 | |
James Robinson | 7b766f4 | 2015-02-06 15:14:04 -0800 | [diff] [blame] | 7 | #include "sandbox/linux/bpf_dsl/codegen.h" |
James Robinson | 74f9f1f | 2014-11-04 11:17:49 -0800 | [diff] [blame] | 8 | #include "sandbox/sandbox_export.h" |
| 9 | |
| 10 | namespace sandbox { |
| 11 | namespace bpf_dsl { |
| 12 | |
| 13 | class 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 Tinnes | 933cbf1 | 2015-09-24 12:25:13 -0700 | [diff] [blame] | 17 | |
| 18 | // StringPrintProgram writes |program| in a human-readable format to |
| 19 | // a std::string. |
| 20 | static std::string StringPrintProgram(const CodeGen::Program& program); |
James Robinson | 74f9f1f | 2014-11-04 11:17:49 -0800 | [diff] [blame] | 21 | }; |
| 22 | |
| 23 | } // namespace bpf_dsl |
| 24 | } // namespace sandbox |