/*
- * Copyright (c) 2018 ARM Limited
+ * Copyright (c) 2018, 2019 ARM Limited
* All rights reserved
*
* The license below extends only to copyright in the software and shall
FILE *file;
};
+ std::string filesRootDir;
std::vector<std::unique_ptr<FileBase>> files;
+ FILE *stdin;
+ FILE *stdout;
+ FILE *stderr;
protected: // Helper functions
unsigned calcTickShift() const {
private:
typedef std::pair<uint64_t, SemiErrno> RetErrno;
- static constexpr RetErrno retError(SemiErrno e) {
+ static RetErrno retError(SemiErrno e) {
return RetErrno((uint64_t)-1, e);
}
- static constexpr RetErrno retOK(uint64_t r) {
+ static RetErrno retOK(uint64_t r) {
return RetErrno(r, 0);
}
#undef SEMI_CALL
static const SemiCall *getCall(uint32_t op, bool aarch64);
+ static FILE *getSTDIO(const char *stream_name,
+ const std::string &name, const char *mode);
static const std::map<uint32_t, SemiCall> calls;
static const std::vector<const char *> fmodes;
static const std::map<uint64_t, const char *> exitCodes;
static const std::vector<uint8_t> features;
+ static const std::map<const std::string, FILE *> stdioMap;
};
#endif // __ARCH_ARM_SEMIHOSTING_HH__