40 lines
851 B
C++
40 lines
851 B
C++
//---
|
|
// fxos-shell.legacy: Legacy vpsace/pseudo-project format
|
|
//---
|
|
|
|
#ifndef FXOS_LEGACY_H
|
|
#define FXOS_LEGACY_H
|
|
|
|
#include <fxos/util/types.h>
|
|
#include <fxos/memory.h>
|
|
|
|
class Session;
|
|
class Parser;
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
#include <map>
|
|
|
|
struct LegacyBinding
|
|
{
|
|
std::string path;
|
|
std::vector<FxOS::MemoryRegion> regions;
|
|
};
|
|
|
|
/* Flat description of a legacy vspace loaded via an fxosrc file. Name might be
|
|
empty. */
|
|
struct LegacyVspace
|
|
{
|
|
LegacyVspace() = default;
|
|
|
|
std::vector<LegacyBinding> bindings;
|
|
std::map<u32,std::string> symbols;
|
|
std::map<int,std::string> syscalls;
|
|
};
|
|
|
|
/* Try to execute a given command as a legacy command. Returns true if handled,
|
|
false if normal behavior should be used. */
|
|
bool legacy_command(Session &session, std::string const &cmd, Parser &parser);
|
|
|
|
#endif /* FXOS_LEGACY_H */
|