代码拉取完成,页面将自动刷新
/* Copyright 2018 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
// Generate a .json file with all the architecture-specific constants.
#include <cstdint>
#include <iomanip>
#include <iostream>
#include <string>
#include "arch.h"
#include "libconstants.h"
#include "libsyscalls.h"
int main() {
// Numeric values are passed to std::cout via std::to_string() to avoid
// the use of 'bextr' asm instruction (when compiled with -march=bdver4).
std::cout << "{\n";
std::cout << " \"arch_nr\": " << std::to_string(MINIJAIL_ARCH_NR) << ",\n";
std::cout << " \"arch_name\": \"" << MINIJAIL_ARCH_NAME << "\",\n";
std::cout << " \"bits\": " << std::to_string(MINIJAIL_ARCH_BITS) << ",\n";
std::cout << " \"syscalls\": {\n";
bool first = true;
for (const struct syscall_entry* entry = syscall_table; entry->name;
++entry) {
if (first)
first = false;
else
std::cout << ",\n";
std::cout << " \"" << entry->name << "\": " << std::to_string(entry->nr);
}
std::cout << "\n },\n";
std::cout << " \"constants\": {\n";
first = true;
for (const struct constant_entry* entry = constant_table; entry->name;
++entry) {
if (first)
first = false;
else
std::cout << ",\n";
std::cout << " \"" << entry->name << "\": "
<< std::to_string(entry->value);
}
std::cout << "\n }\n";
std::cout << "}\n";
return 0;
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。