mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-26 09:35:46 +00:00
Greatly improve /proc/PID/stack by tracing the ebp frame chain.
I also added a generator cache to FileHandle. This way, multiple reads to a generated file (i.e in a synthfs) can transparently handle multiple calls to read() without the contents changing between calls. The cache is discarded at EOF (or when the FileHandle is destroyed.)
This commit is contained in:
@@ -16,6 +16,8 @@
|
||||
|
||||
static const dword mepoch = 476763780;
|
||||
|
||||
class FileHandle;
|
||||
|
||||
class FileSystem : public Retainable<FileSystem> {
|
||||
public:
|
||||
static void initializeGlobals();
|
||||
@@ -30,7 +32,7 @@ public:
|
||||
virtual bool writeInode(InodeIdentifier, const ByteBuffer&) = 0;
|
||||
virtual InodeMetadata inodeMetadata(InodeIdentifier) const = 0;
|
||||
|
||||
virtual Unix::ssize_t readInodeBytes(InodeIdentifier, Unix::off_t offset, Unix::size_t count, byte* buffer) const = 0;
|
||||
virtual Unix::ssize_t readInodeBytes(InodeIdentifier, Unix::off_t offset, Unix::size_t count, byte* buffer, FileHandle*) const = 0;
|
||||
|
||||
struct DirectoryEntry {
|
||||
String name;
|
||||
@@ -44,7 +46,7 @@ public:
|
||||
virtual InodeIdentifier makeDirectory(InodeIdentifier parentInode, const String& name, Unix::mode_t) = 0;
|
||||
|
||||
InodeIdentifier childOfDirectoryInodeWithName(InodeIdentifier, const String& name) const;
|
||||
ByteBuffer readEntireInode(InodeIdentifier) const;
|
||||
ByteBuffer readEntireInode(InodeIdentifier, FileHandle* = nullptr) const;
|
||||
|
||||
protected:
|
||||
FileSystem();
|
||||
|
||||
Reference in New Issue
Block a user