mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-20 22:05:12 +00:00
orbis: improve fd tracing
Some checks are pending
Formatting check / formatting-check (push) Waiting to run
Build RPCSX / build-linux (push) Waiting to run
Build RPCSX / build-android (arm64-v8a, armv8-a) (push) Waiting to run
Build RPCSX / build-android (arm64-v8a, armv8.1-a) (push) Waiting to run
Build RPCSX / build-android (arm64-v8a, armv8.2-a) (push) Waiting to run
Build RPCSX / build-android (arm64-v8a, armv8.4-a) (push) Waiting to run
Build RPCSX / build-android (arm64-v8a, armv8.5-a) (push) Waiting to run
Build RPCSX / build-android (arm64-v8a, armv9-a) (push) Waiting to run
Build RPCSX / build-android (arm64-v8a, armv9.1-a) (push) Waiting to run
Build RPCSX / build-android (x86_64, x86-64) (push) Waiting to run
Some checks are pending
Formatting check / formatting-check (push) Waiting to run
Build RPCSX / build-linux (push) Waiting to run
Build RPCSX / build-android (arm64-v8a, armv8-a) (push) Waiting to run
Build RPCSX / build-android (arm64-v8a, armv8.1-a) (push) Waiting to run
Build RPCSX / build-android (arm64-v8a, armv8.2-a) (push) Waiting to run
Build RPCSX / build-android (arm64-v8a, armv8.4-a) (push) Waiting to run
Build RPCSX / build-android (arm64-v8a, armv8.5-a) (push) Waiting to run
Build RPCSX / build-android (arm64-v8a, armv9-a) (push) Waiting to run
Build RPCSX / build-android (arm64-v8a, armv9.1-a) (push) Waiting to run
Build RPCSX / build-android (x86_64, x86-64) (push) Waiting to run
This commit is contained in:
parent
7c3ee53d6e
commit
566ad3edd8
10 changed files with 100 additions and 34 deletions
|
|
@ -76,6 +76,8 @@ struct IoDevice : rx::RcBase {
|
|||
virtual ErrorCode map(rx::AddressRange range, std::int64_t offset,
|
||||
rx::EnumBitSet<vmem::Protection> protection, File *file,
|
||||
Process *process);
|
||||
|
||||
[[nodiscard]] virtual std::string toString() const;
|
||||
};
|
||||
|
||||
namespace ioctl {
|
||||
|
|
@ -95,6 +97,8 @@ constexpr std::uint32_t paramSize(std::uint32_t cmd) {
|
|||
}
|
||||
constexpr std::uint32_t group(std::uint32_t cmd) { return (cmd >> 8) & 0xff; }
|
||||
constexpr std::uint32_t id(std::uint32_t cmd) { return cmd & 0xff; }
|
||||
|
||||
std::string groupToString(unsigned iocGroup);
|
||||
} // namespace ioctl
|
||||
|
||||
struct IoctlHandlerEntry;
|
||||
|
|
@ -201,5 +205,9 @@ template <int Group> struct IoDeviceWithIoctl : IoDevice {
|
|||
|
||||
return ioctlTable[id].handler(thread, argp, this, ioctlTable[id].impl);
|
||||
}
|
||||
|
||||
[[nodiscard]] std::string toString() const override {
|
||||
return ioctl::groupToString(Group) + " " + IoDevice::toString();
|
||||
}
|
||||
};
|
||||
} // namespace orbis
|
||||
|
|
|
|||
|
|
@ -43,32 +43,32 @@ struct FileOps {
|
|||
// TODO: chown
|
||||
// TODO: chmod
|
||||
|
||||
ErrorCode (*bind)(orbis::File *file, SocketAddress *address,
|
||||
std::size_t addressLen, Thread *thread) = nullptr;
|
||||
ErrorCode (*listen)(orbis::File *file, int backlog, Thread *thread) = nullptr;
|
||||
ErrorCode (*accept)(orbis::File *file, SocketAddress *address,
|
||||
ErrorCode (*bind)(File *file, SocketAddress *address, std::size_t addressLen,
|
||||
Thread *thread) = nullptr;
|
||||
ErrorCode (*listen)(File *file, int backlog, Thread *thread) = nullptr;
|
||||
ErrorCode (*accept)(File *file, SocketAddress *address,
|
||||
std::uint32_t *addressLen, Thread *thread) = nullptr;
|
||||
ErrorCode (*connect)(orbis::File *file, SocketAddress *address,
|
||||
ErrorCode (*connect)(File *file, SocketAddress *address,
|
||||
std::uint32_t addressLen, Thread *thread) = nullptr;
|
||||
ErrorCode (*sendto)(orbis::File *file, const void *buf, size_t len,
|
||||
sint flags, caddr_t to, sint tolen,
|
||||
Thread *thread) = nullptr;
|
||||
ErrorCode (*sendmsg)(orbis::File *file, msghdr *msg, sint flags,
|
||||
ErrorCode (*sendto)(File *file, const void *buf, size_t len, sint flags,
|
||||
caddr_t to, sint tolen, Thread *thread) = nullptr;
|
||||
ErrorCode (*sendmsg)(File *file, msghdr *msg, sint flags,
|
||||
Thread *thread) = nullptr;
|
||||
ErrorCode (*recvfrom)(orbis::File *file, void *buf, size_t len, sint flags,
|
||||
ErrorCode (*recvfrom)(File *file, void *buf, size_t len, sint flags,
|
||||
SocketAddress *from, uint32_t *fromlenaddr,
|
||||
Thread *thread) = nullptr;
|
||||
ErrorCode (*recvmsg)(orbis::File *file, msghdr *msg, sint flags,
|
||||
ErrorCode (*recvmsg)(File *file, msghdr *msg, sint flags,
|
||||
Thread *thread) = nullptr;
|
||||
ErrorCode (*shutdown)(orbis::File *file, sint how, Thread *thread) = nullptr;
|
||||
ErrorCode (*setsockopt)(orbis::File *file, sint level, sint name,
|
||||
const void *val, sint valsize,
|
||||
Thread *thread) = nullptr;
|
||||
ErrorCode (*getsockopt)(orbis::File *file, sint level, sint name, void *val,
|
||||
ErrorCode (*shutdown)(File *file, sint how, Thread *thread) = nullptr;
|
||||
ErrorCode (*setsockopt)(File *file, sint level, sint name, const void *val,
|
||||
sint valsize, Thread *thread) = nullptr;
|
||||
ErrorCode (*getsockopt)(File *file, sint level, sint name, void *val,
|
||||
sint *avalsize, Thread *thread) = nullptr;
|
||||
ErrorCode (*sendfile)(orbis::File *file, sint fd, off_t offset, size_t nbytes,
|
||||
ErrorCode (*sendfile)(File *file, sint fd, off_t offset, size_t nbytes,
|
||||
ptr<struct sf_hdtr> hdtr, ptr<off_t> sbytes, sint flags,
|
||||
Thread *thread) = nullptr;
|
||||
|
||||
std::string (*toString)(File *file, Thread *thread);
|
||||
};
|
||||
|
||||
struct File : rx::RcBase {
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ using sy_call_t = SysResult(Thread *, uint64_t *);
|
|||
struct sysent {
|
||||
sint narg;
|
||||
sy_call_t *call;
|
||||
std::string (*format)(uint64_t *);
|
||||
std::string (*format)(Thread *, uint64_t *);
|
||||
};
|
||||
|
||||
struct sysentvec {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue