Merge pull request #7157 from lioncash/override

Core: Add missing override specifiers
This commit is contained in:
Henrik Rydgård 2014-12-08 22:37:33 +01:00
commit f135bf79e3
29 changed files with 265 additions and 261 deletions

View File

@ -70,13 +70,14 @@ class DisassemblyFunction: public DisassemblyEntry
{
public:
DisassemblyFunction(u32 _address, u32 _size);
virtual void recheck();
virtual int getNumLines();
virtual int getLineNum(u32 address, bool findStart);
virtual u32 getLineAddress(int line);
virtual u32 getTotalSize() { return size; };
virtual bool disassemble(u32 address, DisassemblyLineInfo& dest, bool insertSymbols);
virtual void getBranchLines(u32 start, u32 size, std::vector<BranchLine>& dest);
void recheck() override;
int getNumLines() override;
int getLineNum(u32 address, bool findStart) override;
u32 getLineAddress(int line) override;
u32 getTotalSize() override { return size; };
bool disassemble(u32 address, DisassemblyLineInfo& dest, bool insertSymbols) override;
void getBranchLines(u32 start, u32 size, std::vector<BranchLine>& dest) override;
private:
void generateBranchLines();
void load();
@ -96,13 +97,14 @@ class DisassemblyOpcode: public DisassemblyEntry
public:
DisassemblyOpcode(u32 _address, int _num): address(_address), num(_num) { };
virtual ~DisassemblyOpcode() { };
virtual void recheck() { };
virtual int getNumLines() { return num; };
virtual int getLineNum(u32 address, bool findStart) { return (address-this->address)/4; };
virtual u32 getLineAddress(int line) { return address+line*4; };
virtual u32 getTotalSize() { return num*4; };
virtual bool disassemble(u32 address, DisassemblyLineInfo& dest, bool insertSymbols);
virtual void getBranchLines(u32 start, u32 size, std::vector<BranchLine>& dest);
void recheck() override { };
int getNumLines() override { return num; };
int getLineNum(u32 address, bool findStart) override { return (address - this->address) / 4; };
u32 getLineAddress(int line) override { return address + line * 4; };
u32 getTotalSize() override { return num * 4; };
bool disassemble(u32 address, DisassemblyLineInfo& dest, bool insertSymbols) override;
void getBranchLines(u32 start, u32 size, std::vector<BranchLine>& dest) override;
private:
u32 address;
int num;
@ -114,16 +116,16 @@ class DisassemblyMacro: public DisassemblyEntry
public:
DisassemblyMacro(u32 _address): address(_address) { };
virtual ~DisassemblyMacro() { };
void setMacroLi(u32 _immediate, u8 _rt);
void setMacroMemory(std::string _name, u32 _immediate, u8 _rt, int _dataSize);
virtual void recheck() { };
virtual int getNumLines() { return 1; };
virtual int getLineNum(u32 address, bool findStart) { return 0; };
virtual u32 getLineAddress(int line) { return address; };
virtual u32 getTotalSize() { return numOpcodes*4; };
virtual bool disassemble(u32 address, DisassemblyLineInfo& dest, bool insertSymbols) ;
void recheck() override { };
int getNumLines() override { return 1; };
int getLineNum(u32 address, bool findStart) override { return 0; };
u32 getLineAddress(int line) override { return address; };
u32 getTotalSize() override { return numOpcodes * 4; };
bool disassemble(u32 address, DisassemblyLineInfo& dest, bool insertSymbols) override;
private:
enum MacroType { MACRO_LI, MACRO_MEMORYIMM };
@ -142,13 +144,14 @@ class DisassemblyData: public DisassemblyEntry
public:
DisassemblyData(u32 _address, u32 _size, DataType _type);
virtual ~DisassemblyData() { };
virtual void recheck();
virtual int getNumLines() { return (int)lines.size(); };
virtual int getLineNum(u32 address, bool findStart);
virtual u32 getLineAddress(int line) { return lineAddresses[line]; };
virtual u32 getTotalSize() { return size; };
virtual bool disassemble(u32 address, DisassemblyLineInfo& dest, bool insertSymbols);
void recheck() override;
int getNumLines() override { return (int)lines.size(); };
int getLineNum(u32 address, bool findStart) override;
u32 getLineAddress(int line) override { return lineAddresses[line]; };
u32 getTotalSize() override { return size; };
bool disassemble(u32 address, DisassemblyLineInfo& dest, bool insertSymbols) override;
private:
void createLines();
@ -172,13 +175,14 @@ class DisassemblyComment: public DisassemblyEntry
public:
DisassemblyComment(u32 _address, u32 _size, std::string name, std::string param);
virtual ~DisassemblyComment() { };
virtual void recheck() { };
virtual int getNumLines() { return 1; };
virtual int getLineNum(u32 address, bool findStart) { return 0; };
virtual u32 getLineAddress(int line) { return address; };
virtual u32 getTotalSize() { return size; };
virtual bool disassemble(u32 address, DisassemblyLineInfo& dest, bool insertSymbols);
void recheck() override { };
int getNumLines() override { return 1; };
int getLineNum(u32 address, bool findStart) override { return 0; };
u32 getLineAddress(int line) override { return address; };
u32 getTotalSize() override { return size; };
bool disassemble(u32 address, DisassemblyLineInfo& dest, bool insertSymbols) override;
private:
u32 address;
u32 size;

View File

@ -42,9 +42,9 @@ public:
virtual ~PSPGamedataInstallDialog();
virtual int Init(u32 paramAddr);
virtual int Update(int animSpeed);
virtual int Shutdown(bool force = false);
virtual void DoState(PointerWrap &p);
virtual int Update(int animSpeed) override;
virtual int Shutdown(bool force = false) override;
virtual void DoState(PointerWrap &p) override;
int Abort();
std::string GetGameDataInstallFileName(SceUtilityGamedataInstallParam *param, std::string filename);

View File

@ -60,10 +60,10 @@ public:
virtual ~PSPMsgDialog();
virtual int Init(unsigned int paramAddr);
virtual int Update(int animSpeed);
virtual int Shutdown(bool force = false);
virtual void DoState(PointerWrap &p);
virtual pspUtilityDialogCommon *GetCommonParam();
virtual int Update(int animSpeed) override;
virtual int Shutdown(bool force = false) override;
virtual void DoState(PointerWrap &p) override;
virtual pspUtilityDialogCommon *GetCommonParam() override;
int Abort();

View File

@ -40,9 +40,9 @@ public:
virtual ~PSPNetconfDialog();
virtual int Init(u32 paramAddr);
virtual int Update(int animSpeed);
virtual int Shutdown(bool force = false);
virtual void DoState(PointerWrap &p);
virtual int Update(int animSpeed) override;
virtual int Shutdown(bool force = false) override;
virtual void DoState(PointerWrap &p) override;
private:
void DrawBanner();

View File

@ -206,10 +206,10 @@ public:
virtual ~PSPOskDialog();
virtual int Init(u32 oskPtr);
virtual int Update(int animSpeed);
virtual int Shutdown(bool force = false);
virtual void DoState(PointerWrap &p);
virtual pspUtilityDialogCommon *GetCommonParam();
virtual int Update(int animSpeed) override;
virtual int Shutdown(bool force = false) override;
virtual void DoState(PointerWrap &p) override;
virtual pspUtilityDialogCommon *GetCommonParam() override;
protected:
virtual bool UseAutoStatus() {

View File

@ -25,6 +25,6 @@ public:
virtual ~PSPPlaceholderDialog();
virtual int Init();
virtual int Update(int animSpeed);
virtual int Update(int animSpeed) override;
};

View File

@ -73,10 +73,10 @@ public:
virtual ~PSPSaveDialog();
virtual int Init(int paramAddr);
virtual int Update(int animSpeed);
virtual int Shutdown(bool force = false);
virtual void DoState(PointerWrap &p);
virtual pspUtilityDialogCommon *GetCommonParam();
virtual int Update(int animSpeed) override;
virtual int Shutdown(bool force = false) override;
virtual void DoState(PointerWrap &p) override;
virtual pspUtilityDialogCommon *GetCommonParam() override;
void ExecuteIOAction();

View File

@ -28,9 +28,9 @@ public:
virtual ~PSPScreenshotDialog();
virtual int Init(u32 paramAddr);
virtual int Update(int animSpeed);
virtual int Update(int animSpeed) override;
virtual int ContStart();
virtual void DoState(PointerWrap &p);
virtual void DoState(PointerWrap &p) override;
protected:
int mode;

View File

@ -54,7 +54,7 @@ public:
~CISOFileBlockDevice();
bool ReadBlock(int blockNumber, u8 *outPtr) override;
bool ReadBlocks(u32 minBlock, int count, u8 *outPtr) override;
u32 GetNumBlocks() { return numBlocks;}
u32 GetNumBlocks() override { return numBlocks; }
private:
FileLoader *fileLoader_;

View File

@ -91,24 +91,24 @@ public:
void CloseAll();
void DoState(PointerWrap &p);
std::vector<PSPFileInfo> GetDirListing(std::string path);
u32 OpenFile(std::string filename, FileAccess access, const char *devicename=NULL);
void CloseFile(u32 handle);
size_t ReadFile(u32 handle, u8 *pointer, s64 size);
size_t WriteFile(u32 handle, const u8 *pointer, s64 size);
size_t SeekFile(u32 handle, s32 position, FileMove type);
PSPFileInfo GetFileInfo(std::string filename);
bool OwnsHandle(u32 handle);
int Ioctl(u32 handle, u32 cmd, u32 indataPtr, u32 inlen, u32 outdataPtr, u32 outlen, int &usec);
int DevType(u32 handle);
void DoState(PointerWrap &p) override;
std::vector<PSPFileInfo> GetDirListing(std::string path) override;
u32 OpenFile(std::string filename, FileAccess access, const char *devicename=NULL) override;
void CloseFile(u32 handle) override;
size_t ReadFile(u32 handle, u8 *pointer, s64 size) override;
size_t WriteFile(u32 handle, const u8 *pointer, s64 size) override;
size_t SeekFile(u32 handle, s32 position, FileMove type) override;
PSPFileInfo GetFileInfo(std::string filename) override;
bool OwnsHandle(u32 handle) override;
int Ioctl(u32 handle, u32 cmd, u32 indataPtr, u32 inlen, u32 outdataPtr, u32 outlen, int &usec) override;
int DevType(u32 handle) override;
bool MkDir(const std::string &dirname);
bool RmDir(const std::string &dirname);
int RenameFile(const std::string &from, const std::string &to);
bool RemoveFile(const std::string &filename);
bool GetHostPath(const std::string &inpath, std::string &outpath);
int Flags() { return flags; }
bool MkDir(const std::string &dirname) override;
bool RmDir(const std::string &dirname) override;
int RenameFile(const std::string &from, const std::string &to) override;
bool RemoveFile(const std::string &filename) override;
bool GetHostPath(const std::string &inpath, std::string &outpath) override;
int Flags() override { return flags; }
u64 FreeSpace(const std::string &path) override;
private:
@ -134,24 +134,24 @@ public:
VFSFileSystem(IHandleAllocator *_hAlloc, std::string _basePath);
~VFSFileSystem();
void DoState(PointerWrap &p);
std::vector<PSPFileInfo> GetDirListing(std::string path);
u32 OpenFile(std::string filename, FileAccess access, const char *devicename=NULL);
void CloseFile(u32 handle);
size_t ReadFile(u32 handle, u8 *pointer, s64 size);
size_t WriteFile(u32 handle, const u8 *pointer, s64 size);
size_t SeekFile(u32 handle, s32 position, FileMove type);
PSPFileInfo GetFileInfo(std::string filename);
bool OwnsHandle(u32 handle);
int Ioctl(u32 handle, u32 cmd, u32 indataPtr, u32 inlen, u32 outdataPtr, u32 outlen, int &usec);
int DevType(u32 handle);
void DoState(PointerWrap &p) override;
std::vector<PSPFileInfo> GetDirListing(std::string path) override;
u32 OpenFile(std::string filename, FileAccess access, const char *devicename=NULL) override;
void CloseFile(u32 handle) override;
size_t ReadFile(u32 handle, u8 *pointer, s64 size) override;
size_t WriteFile(u32 handle, const u8 *pointer, s64 size) override;
size_t SeekFile(u32 handle, s32 position, FileMove type) override;
PSPFileInfo GetFileInfo(std::string filename) override;
bool OwnsHandle(u32 handle) override;
int Ioctl(u32 handle, u32 cmd, u32 indataPtr, u32 inlen, u32 outdataPtr, u32 outlen, int &usec) override;
int DevType(u32 handle) override;
bool MkDir(const std::string &dirname);
bool RmDir(const std::string &dirname);
int RenameFile(const std::string &from, const std::string &to);
bool RemoveFile(const std::string &filename);
bool GetHostPath(const std::string &inpath, std::string &outpath);
int Flags() { return 0; }
bool MkDir(const std::string &dirname) override;
bool RmDir(const std::string &dirname) override;
int RenameFile(const std::string &from, const std::string &to) override;
bool RemoveFile(const std::string &filename) override;
bool GetHostPath(const std::string &inpath, std::string &outpath) override;
int Flags() override { return 0; }
u64 FreeSpace(const std::string &path) override { return 0; }
private:

View File

@ -67,9 +67,9 @@ public:
}
return res;
}
void FreeHandle(u32 handle) {}
void FreeHandle(u32 handle) override {}
virtual void DoState(PointerWrap &p);
void DoState(PointerWrap &p) override;
IFileSystem *GetHandleOwner(u32 handle);
bool MapFilePath(const std::string &inpath, std::string &outpath, MountPoint **system);
@ -89,17 +89,17 @@ public:
std::string NormalizePrefix(std::string prefix) const;
// Only possible if a file system is a DirectoryFileSystem or similar.
bool GetHostPath(const std::string &inpath, std::string &outpath);
bool GetHostPath(const std::string &inpath, std::string &outpath) override;
std::vector<PSPFileInfo> GetDirListing(std::string path);
u32 OpenFile(std::string filename, FileAccess access, const char *devicename = NULL);
std::vector<PSPFileInfo> GetDirListing(std::string path) override;
u32 OpenFile(std::string filename, FileAccess access, const char *devicename = NULL) override;
u32 OpenWithError(int &error, std::string filename, FileAccess access, const char *devicename = NULL);
void CloseFile(u32 handle);
size_t ReadFile(u32 handle, u8 *pointer, s64 size);
size_t WriteFile(u32 handle, const u8 *pointer, s64 size);
size_t SeekFile(u32 handle, s32 position, FileMove type);
PSPFileInfo GetFileInfo(std::string filename);
bool OwnsHandle(u32 handle) {return false;}
void CloseFile(u32 handle) override;
size_t ReadFile(u32 handle, u8 *pointer, s64 size) override;
size_t WriteFile(u32 handle, const u8 *pointer, s64 size) override;
size_t SeekFile(u32 handle, s32 position, FileMove type) override;
PSPFileInfo GetFileInfo(std::string filename) override;
bool OwnsHandle(u32 handle) override { return false; }
inline size_t GetSeekPos(u32 handle)
{
return SeekFile(handle, 0, FILEMOVE_CURRENT);
@ -107,14 +107,14 @@ public:
virtual int ChDir(const std::string &dir);
virtual bool MkDir(const std::string &dirname);
virtual bool RmDir(const std::string &dirname);
virtual int RenameFile(const std::string &from, const std::string &to);
virtual bool RemoveFile(const std::string &filename);
virtual int Ioctl(u32 handle, u32 cmd, u32 indataPtr, u32 inlen, u32 outdataPtr, u32 outlen, int &usec);
virtual int DevType(u32 handle);
virtual int Flags() { return 0; }
virtual u64 FreeSpace(const std::string &path) override;
bool MkDir(const std::string &dirname) override;
bool RmDir(const std::string &dirname) override;
int RenameFile(const std::string &from, const std::string &to) override;
bool RemoveFile(const std::string &filename) override;
int Ioctl(u32 handle, u32 cmd, u32 indataPtr, u32 inlen, u32 outdataPtr, u32 outlen, int &usec) override;
int DevType(u32 handle) override;
int Flags() override { return 0; }
u64 FreeSpace(const std::string &path) override;
// Convenience helper - returns < 0 on failure.
int ReadEntireFile(const std::string &filename, std::vector<u8> &data);

View File

@ -29,26 +29,26 @@ public:
VirtualDiscFileSystem(IHandleAllocator *_hAlloc, std::string _basePath);
~VirtualDiscFileSystem();
void DoState(PointerWrap &p);
u32 OpenFile(std::string filename, FileAccess access, const char *devicename=NULL);
size_t SeekFile(u32 handle, s32 position, FileMove type);
size_t ReadFile(u32 handle, u8 *pointer, s64 size);
void CloseFile(u32 handle);
PSPFileInfo GetFileInfo(std::string filename);
bool OwnsHandle(u32 handle);
int Ioctl(u32 handle, u32 cmd, u32 indataPtr, u32 inlen, u32 outdataPtr, u32 outlen, int &usec);
int DevType(u32 handle);
bool GetHostPath(const std::string &inpath, std::string &outpath);
std::vector<PSPFileInfo> GetDirListing(std::string path);
int Flags() { return 0; }
void DoState(PointerWrap &p) override;
u32 OpenFile(std::string filename, FileAccess access, const char *devicename=NULL) override;
size_t SeekFile(u32 handle, s32 position, FileMove type) override;
size_t ReadFile(u32 handle, u8 *pointer, s64 size) override;
void CloseFile(u32 handle) override;
PSPFileInfo GetFileInfo(std::string filename) override;
bool OwnsHandle(u32 handle) override;
int Ioctl(u32 handle, u32 cmd, u32 indataPtr, u32 inlen, u32 outdataPtr, u32 outlen, int &usec) override;
int DevType(u32 handle) override;
bool GetHostPath(const std::string &inpath, std::string &outpath) override;
std::vector<PSPFileInfo> GetDirListing(std::string path) override;
int Flags() override { return 0; }
u64 FreeSpace(const std::string &path) override { return 0; }
// unsupported operations
size_t WriteFile(u32 handle, const u8 *pointer, s64 size);
bool MkDir(const std::string &dirname);
bool RmDir(const std::string &dirname);
int RenameFile(const std::string &from, const std::string &to);
bool RemoveFile(const std::string &filename);
size_t WriteFile(u32 handle, const u8 *pointer, s64 size) override;
bool MkDir(const std::string &dirname) override;
bool RmDir(const std::string &dirname) override;
int RenameFile(const std::string &from, const std::string &to) override;
bool RemoveFile(const std::string &filename) override;
private:
void LoadFileListIndex();

View File

@ -340,7 +340,7 @@ class PostAllocCallback : public Action {
public:
PostAllocCallback() {}
static Action *Create() { return new PostAllocCallback(); }
void DoState(PointerWrap &p) {
void DoState(PointerWrap &p) override {
auto s = p.Section("PostAllocCallback", 1, 2);
if (!s)
return;
@ -350,7 +350,7 @@ public:
p.Do(errorCodePtr_);
}
}
void run(MipsCall &call);
void run(MipsCall &call) override;
void SetFontLib(u32 fontLibID, u32 errorCodePtr) { fontLibID_ = fontLibID; errorCodePtr_ = errorCodePtr; }
private:
@ -362,14 +362,14 @@ class PostOpenCallback : public Action {
public:
PostOpenCallback() {}
static Action *Create() { return new PostOpenCallback(); }
void DoState(PointerWrap &p) {
void DoState(PointerWrap &p) override {
auto s = p.Section("PostOpenCallback", 1);
if (!s)
return;
p.Do(fontLibID_);
}
void run(MipsCall &call);
void run(MipsCall &call) override;
void SetFontLib(u32 fontLibID) { fontLibID_ = fontLibID; }
private:

View File

@ -127,7 +127,7 @@ class GeIntrHandler : public IntrHandler
public:
GeIntrHandler() : IntrHandler(PSP_GE_INTR) {}
bool run(PendingInterrupt& pend)
bool run(PendingInterrupt& pend) override
{
GeInterruptData intrdata = ge_pending_cb.front();
DisplayList* dl = gpu->getList(intrdata.listid);
@ -210,7 +210,7 @@ public:
return false;
}
virtual void handleResult(PendingInterrupt& pend)
void handleResult(PendingInterrupt& pend) override
{
GeInterruptData intrdata = ge_pending_cb.front();
ge_pending_cb.pop_front();

View File

@ -159,20 +159,20 @@ public:
pspFileSystem.CloseFile(handle);
pgd_close(pgdInfo);
}
const char *GetName() {return fullpath.c_str();}
const char *GetTypeName() {return "OpenFile";}
void GetQuickInfo(char *ptr, int size) {
const char *GetName() override { return fullpath.c_str(); }
const char *GetTypeName() override { return "OpenFile"; }
void GetQuickInfo(char *ptr, int size) override {
sprintf(ptr, "Seekpos: %08x", (u32)pspFileSystem.GetSeekPos(handle));
}
static u32 GetMissingErrorCode() { return SCE_KERNEL_ERROR_BADF; }
static int GetStaticIDType() { return PPSSPP_KERNEL_TMID_File; }
int GetIDType() const { return PPSSPP_KERNEL_TMID_File; }
int GetIDType() const override { return PPSSPP_KERNEL_TMID_File; }
bool asyncBusy() {
return pendingAsyncResult || hasAsyncResult;
}
virtual void DoState(PointerWrap &p) {
void DoState(PointerWrap &p) override {
auto s = p.Section("FileNode", 1);
if (!s)
return;
@ -1874,13 +1874,13 @@ static u32 sceIoPollAsync(int id, u32 address) {
class DirListing : public KernelObject {
public:
const char *GetName() {return name.c_str();}
const char *GetTypeName() {return "DirListing";}
const char *GetName() override { return name.c_str(); }
const char *GetTypeName() override { return "DirListing"; }
static u32 GetMissingErrorCode() { return SCE_KERNEL_ERROR_BADF; }
static int GetStaticIDType() { return PPSSPP_KERNEL_TMID_DirList; }
int GetIDType() const { return PPSSPP_KERNEL_TMID_DirList; }
int GetIDType() const override { return PPSSPP_KERNEL_TMID_DirList; }
virtual void DoState(PointerWrap &p) {
void DoState(PointerWrap &p) override {
auto s = p.Section("DirListing", 1);
if (!s)
return;

View File

@ -64,7 +64,7 @@ class AlarmIntrHandler : public IntrHandler
public:
AlarmIntrHandler() : IntrHandler(PSP_SYSTIMER0_INTR) {}
virtual bool run(PendingInterrupt& pend)
bool run(PendingInterrupt& pend) override
{
u32 error;
int alarmID = triggeredAlarm.front();
@ -83,7 +83,7 @@ public:
return true;
}
virtual void handleResult(PendingInterrupt& pend)
void handleResult(PendingInterrupt& pend) override
{
int result = currentMIPS->r[MIPS_REG_V0];

View File

@ -58,9 +58,9 @@ struct EventFlagTh
class EventFlag : public KernelObject
{
public:
const char *GetName() {return nef.name;}
const char *GetTypeName() {return "EventFlag";}
void GetQuickInfo(char *ptr, int size)
const char *GetName() override { return nef.name; }
const char *GetTypeName() override { return "EventFlag"; }
void GetQuickInfo(char *ptr, int size) override
{
sprintf(ptr, "init=%08x cur=%08x numwait=%i",
nef.initPattern,
@ -72,9 +72,9 @@ public:
return SCE_KERNEL_ERROR_UNKNOWN_EVFID;
}
static int GetStaticIDType() { return SCE_KERNEL_TMID_EventFlag; }
int GetIDType() const { return SCE_KERNEL_TMID_EventFlag; }
int GetIDType() const override { return SCE_KERNEL_TMID_EventFlag; }
virtual void DoState(PointerWrap &p)
void DoState(PointerWrap &p) override
{
auto s = p.Section("EventFlag", 1);
if (!s)

View File

@ -60,11 +60,11 @@ struct NativeMbx
struct Mbx : public KernelObject
{
const char *GetName() {return nmb.name;}
const char *GetTypeName() {return "Mbx";}
const char *GetName() override { return nmb.name; }
const char *GetTypeName() override { return "Mbx"; }
static u32 GetMissingErrorCode() { return SCE_KERNEL_ERROR_UNKNOWN_MBXID; }
static int GetStaticIDType() { return SCE_KERNEL_TMID_Mbox; }
int GetIDType() const { return SCE_KERNEL_TMID_Mbox; }
int GetIDType() const override { return SCE_KERNEL_TMID_Mbox; }
void AddWaitingThread(SceUID id, u32 addr)
{
@ -159,7 +159,7 @@ struct Mbx : public KernelObject
return 0;
}
virtual void DoState(PointerWrap &p)
void DoState(PointerWrap &p) override
{
auto s = p.Section("Mbx", 1);
if (!s)

View File

@ -90,11 +90,11 @@ struct FPL : public KernelObject
delete [] blocks;
}
}
const char *GetName() {return nf.name;}
const char *GetTypeName() {return "FPL";}
const char *GetName() override { return nf.name; }
const char *GetTypeName() override { return "FPL"; }
static u32 GetMissingErrorCode() { return SCE_KERNEL_ERROR_UNKNOWN_FPLID; }
static int GetStaticIDType() { return SCE_KERNEL_TMID_Fpl; }
int GetIDType() const { return SCE_KERNEL_TMID_Fpl; }
int GetIDType() const override { return SCE_KERNEL_TMID_Fpl; }
int findFreeBlock() {
for (int i = 0; i < nf.numBlocks; i++) {
@ -121,7 +121,7 @@ struct FPL : public KernelObject
return false;
}
virtual void DoState(PointerWrap &p)
void DoState(PointerWrap &p) override
{
auto s = p.Section("FPL", 1);
if (!s)
@ -379,17 +379,17 @@ struct SceKernelVplHeader {
struct VPL : public KernelObject
{
const char *GetName() {return nv.name;}
const char *GetTypeName() {return "VPL";}
const char *GetName() override { return nv.name; }
const char *GetTypeName() override { return "VPL"; }
static u32 GetMissingErrorCode() { return SCE_KERNEL_ERROR_UNKNOWN_VPLID; }
static int GetStaticIDType() { return SCE_KERNEL_TMID_Vpl; }
int GetIDType() const { return SCE_KERNEL_TMID_Vpl; }
int GetIDType() const override { return SCE_KERNEL_TMID_Vpl; }
VPL() : alloc(8) {
header = 0;
}
virtual void DoState(PointerWrap &p) {
void DoState(PointerWrap &p) override {
auto s = p.Section("VPL", 1, 2);
if (!s) {
return;
@ -896,16 +896,16 @@ int sceKernelReferFplStatus(SceUID uid, u32 statusPtr)
class PartitionMemoryBlock : public KernelObject
{
public:
const char *GetName() {return name;}
const char *GetTypeName() {return "MemoryPart";}
void GetQuickInfo(char *ptr, int size)
const char *GetName() override { return name; }
const char *GetTypeName() override { return "MemoryPart"; }
void GetQuickInfo(char *ptr, int size) override
{
int sz = alloc->GetBlockSizeFromAddress(address);
snprintf(ptr, size, "MemPart: %08x - %08x size: %08x", address, address + sz, sz);
}
static u32 GetMissingErrorCode() { return SCE_KERNEL_ERROR_UNKNOWN_UID; }
static int GetStaticIDType() { return PPSSPP_KERNEL_TMID_PMB; }
int GetIDType() const { return PPSSPP_KERNEL_TMID_PMB; }
int GetIDType() const override { return PPSSPP_KERNEL_TMID_PMB; }
PartitionMemoryBlock(BlockAllocator *_alloc, const char *_name, u32 size, MemblockType type, u32 alignment)
{
@ -938,7 +938,7 @@ public:
bool IsValid() {return address != (u32)-1;}
BlockAllocator *alloc;
virtual void DoState(PointerWrap &p)
void DoState(PointerWrap &p) override
{
auto s = p.Section("PMB", 1);
if (!s)
@ -1865,15 +1865,15 @@ struct NativeTlspl
struct TLSPL : public KernelObject
{
const char *GetName() {return ntls.name;}
const char *GetTypeName() {return "TLS";}
const char *GetName() override { return ntls.name; }
const char *GetTypeName() override { return "TLS"; }
static u32 GetMissingErrorCode() { return PSP_ERROR_UNKNOWN_TLSPL_ID; }
static int GetStaticIDType() { return SCE_KERNEL_TMID_Tlspl; }
int GetIDType() const { return SCE_KERNEL_TMID_Tlspl; }
int GetIDType() const override { return SCE_KERNEL_TMID_Tlspl; }
TLSPL() : next(0) {}
virtual void DoState(PointerWrap &p)
void DoState(PointerWrap &p) override
{
auto s = p.Section("TLS", 1);
if (!s)

View File

@ -230,9 +230,9 @@ public:
symbolMap.UnloadModule(memoryBlockAddr, memoryBlockSize);
}
}
const char *GetName() {return nm.name;}
const char *GetTypeName() {return "Module";}
void GetQuickInfo(char *ptr, int size)
const char *GetName() override { return nm.name; }
const char *GetTypeName() override { return "Module"; }
void GetQuickInfo(char *ptr, int size) override
{
// ignore size
sprintf(ptr, "%sname=%s gp=%08x entry=%08x",
@ -243,9 +243,9 @@ public:
}
static u32 GetMissingErrorCode() { return SCE_KERNEL_ERROR_UNKNOWN_MODULE; }
static int GetStaticIDType() { return PPSSPP_KERNEL_TMID_Module; }
int GetIDType() const { return PPSSPP_KERNEL_TMID_Module; }
int GetIDType() const override { return PPSSPP_KERNEL_TMID_Module; }
virtual void DoState(PointerWrap &p)
void DoState(PointerWrap &p) override
{
auto s = p.Section("Module", 1, 3);
if (!s)

View File

@ -130,11 +130,11 @@ static bool __KernelMsgPipeThreadSortPriority(MsgPipeWaitingThread thread1, MsgP
struct MsgPipe : public KernelObject
{
const char *GetName() {return nmp.name;}
const char *GetTypeName() {return "MsgPipe";}
const char *GetName() override { return nmp.name; }
const char *GetTypeName() override { return "MsgPipe"; }
static u32 GetMissingErrorCode() { return SCE_KERNEL_ERROR_UNKNOWN_MPPID; }
static int GetStaticIDType() { return SCE_KERNEL_TMID_Mpipe; }
int GetIDType() const { return SCE_KERNEL_TMID_Mpipe; }
int GetIDType() const override { return SCE_KERNEL_TMID_Mpipe; }
MsgPipe() : buffer(0) {}
~MsgPipe()
@ -270,7 +270,7 @@ struct MsgPipe : public KernelObject
HLEKernel::RemoveWaitingThread(sendWaitingThreads, threadID);
}
virtual void DoState(PointerWrap &p)
void DoState(PointerWrap &p) override
{
auto s = p.Section("MsgPipe", 1);
if (!s)

View File

@ -72,13 +72,13 @@ struct NativeMutex
struct Mutex : public KernelObject
{
const char *GetName() {return nm.name;}
const char *GetTypeName() {return "Mutex";}
const char *GetName() override { return nm.name; }
const char *GetTypeName() override { return "Mutex"; }
static u32 GetMissingErrorCode() { return PSP_MUTEX_ERROR_NO_SUCH_MUTEX; }
static int GetStaticIDType() { return SCE_KERNEL_TMID_Mutex; }
int GetIDType() const { return SCE_KERNEL_TMID_Mutex; }
int GetIDType() const override { return SCE_KERNEL_TMID_Mutex; }
virtual void DoState(PointerWrap &p)
void DoState(PointerWrap &p) override
{
auto s = p.Section("Mutex", 1);
if (!s)
@ -137,13 +137,13 @@ struct NativeLwMutex
struct LwMutex : public KernelObject
{
const char *GetName() {return nm.name;}
const char *GetTypeName() {return "LwMutex";}
const char *GetName() override { return nm.name; }
const char *GetTypeName() override { return "LwMutex"; }
static u32 GetMissingErrorCode() { return PSP_LWMUTEX_ERROR_NO_SUCH_LWMUTEX; }
static int GetStaticIDType() { return SCE_KERNEL_TMID_LwMutex; }
int GetIDType() const { return SCE_KERNEL_TMID_LwMutex; }
int GetIDType() const override { return SCE_KERNEL_TMID_LwMutex; }
virtual void DoState(PointerWrap &p)
void DoState(PointerWrap &p) override
{
auto s = p.Section("LwMutex", 1);
if (!s)

View File

@ -55,14 +55,14 @@ struct NativeSemaphore
struct Semaphore : public KernelObject
{
const char *GetName() {return ns.name;}
const char *GetTypeName() {return "Semaphore";}
const char *GetName() override { return ns.name; }
const char *GetTypeName() override { return "Semaphore"; }
static u32 GetMissingErrorCode() { return SCE_KERNEL_ERROR_UNKNOWN_SEMID; }
static int GetStaticIDType() { return SCE_KERNEL_TMID_Semaphore; }
int GetIDType() const { return SCE_KERNEL_TMID_Semaphore; }
int GetIDType() const override { return SCE_KERNEL_TMID_Semaphore; }
virtual void DoState(PointerWrap &p)
void DoState(PointerWrap &p) override
{
auto s = p.Section("Semaphore", 1);
if (!s)

View File

@ -120,10 +120,10 @@ struct NativeCallback
class Callback : public KernelObject
{
public:
const char *GetName() {return nc.name;}
const char *GetTypeName() {return "CallBack";}
const char *GetName() override { return nc.name; }
const char *GetTypeName() override { return "CallBack"; }
void GetQuickInfo(char *ptr, int size)
void GetQuickInfo(char *ptr, int size) override
{
sprintf(ptr, "thread=%i, argument= %08x",
//hackAddress,
@ -137,9 +137,9 @@ public:
static u32 GetMissingErrorCode() { return SCE_KERNEL_ERROR_UNKNOWN_CBID; }
static int GetStaticIDType() { return SCE_KERNEL_TMID_Callback; }
int GetIDType() const { return SCE_KERNEL_TMID_Callback; }
int GetIDType() const override { return SCE_KERNEL_TMID_Callback; }
virtual void DoState(PointerWrap &p)
void DoState(PointerWrap &p) override
{
auto s = p.Section("Callback", 1);
if (!s)
@ -287,14 +287,14 @@ class ActionAfterMipsCall : public Action
}
public:
virtual void run(MipsCall &call);
void run(MipsCall &call) override;
static Action *Create()
{
return new ActionAfterMipsCall();
}
virtual void DoState(PointerWrap &p)
void DoState(PointerWrap &p) override
{
auto s = p.Section("ActionAfterMipsCall", 1);
if (!s)
@ -338,7 +338,7 @@ class ActionAfterCallback : public Action
{
public:
ActionAfterCallback() {}
virtual void run(MipsCall &call);
void run(MipsCall &call) override;
static Action *Create()
{
@ -350,7 +350,7 @@ public:
cbId = cbId_;
}
void DoState(PointerWrap &p)
void DoState(PointerWrap &p) override
{
auto s = p.Section("ActionAfterCallback", 1);
if (!s)
@ -365,9 +365,9 @@ public:
class Thread : public KernelObject
{
public:
const char *GetName() {return nt.name;}
const char *GetTypeName() {return "Thread";}
void GetQuickInfo(char *ptr, int size)
const char *GetName() override { return nt.name; }
const char *GetTypeName() override { return "Thread"; }
void GetQuickInfo(char *ptr, int size) override
{
sprintf(ptr, "pc= %08x sp= %08x %s %s %s %s %s %s (wt=%i wid=%i wv= %08x )",
context.pc, context.r[MIPS_REG_SP],
@ -384,7 +384,7 @@ public:
static u32 GetMissingErrorCode() { return SCE_KERNEL_ERROR_UNKNOWN_THID; }
static int GetStaticIDType() { return SCE_KERNEL_TMID_Thread; }
int GetIDType() const { return SCE_KERNEL_TMID_Thread; }
int GetIDType() const override { return SCE_KERNEL_TMID_Thread; }
bool AllocateStack(u32 &stackSize)
{
@ -518,7 +518,7 @@ public:
inline bool isWaiting() const { return (nt.status & THREADSTATUS_WAIT) != 0; }
inline bool isSuspended() const { return (nt.status & THREADSTATUS_SUSPEND) != 0; }
virtual void DoState(PointerWrap &p)
void DoState(PointerWrap &p) override
{
auto s = p.Section("Thread", 1, 4);
if (!s)

View File

@ -42,13 +42,13 @@ struct NativeVTimer {
};
struct VTimer : public KernelObject {
const char *GetName() {return nvt.name;}
const char *GetTypeName() {return "VTimer";}
const char *GetName() override { return nvt.name; }
const char *GetTypeName() override { return "VTimer"; }
static u32 GetMissingErrorCode() { return SCE_KERNEL_ERROR_UNKNOWN_VTID; }
static int GetStaticIDType() { return SCE_KERNEL_TMID_VTimer; }
int GetIDType() const { return SCE_KERNEL_TMID_VTimer; }
int GetIDType() const override { return SCE_KERNEL_TMID_VTimer; }
virtual void DoState(PointerWrap &p) {
void DoState(PointerWrap &p) override {
auto s = p.Section("VTimer", 1, 2);
if (!s)
return;
@ -131,7 +131,7 @@ class VTimerIntrHandler : public IntrHandler
public:
VTimerIntrHandler() : IntrHandler(PSP_SYSTIMER1_INTR) {}
virtual bool run(PendingInterrupt &pend) {
bool run(PendingInterrupt &pend) override {
u32 error;
SceUID vtimerID = vtimers.front();
@ -158,7 +158,7 @@ public:
return true;
}
virtual void handleResult(PendingInterrupt &pend) {
void handleResult(PendingInterrupt &pend) override {
u32 result = currentMIPS->r[MIPS_REG_V0];
currentMIPS->r[MIPS_REG_SP] += HANDLER_STACK_SPACE;

View File

@ -343,14 +343,14 @@ public:
PostPutAction() {}
void setRingAddr(u32 ringAddr) { ringAddr_ = ringAddr; }
static Action *Create() { return new PostPutAction; }
void DoState(PointerWrap &p) {
auto s = p.Section("PostPutAction", 1);
if (!s)
return;
void DoState(PointerWrap &p) override {
auto s = p.Section("PostPutAction", 1);
if (!s)
return;
p.Do(ringAddr_);
}
void run(MipsCall &call);
void run(MipsCall &call) override;
private:
u32 ringAddr_;
};

View File

@ -45,7 +45,7 @@ class MipsExpressionFunctions: public IExpressionFunctions
public:
MipsExpressionFunctions(DebugInterface* cpu): cpu(cpu) { };
virtual bool parseReference(char* str, uint32& referenceIndex)
bool parseReference(char* str, uint32& referenceIndex) override
{
for (int i = 0; i < 32; i++)
{
@ -109,12 +109,12 @@ public:
return false;
}
virtual bool parseSymbol(char* str, uint32& symbolValue)
bool parseSymbol(char* str, uint32& symbolValue) override
{
return symbolMap.GetLabelValue(str,symbolValue);
}
virtual uint32 getReferenceValue(uint32 referenceIndex)
uint32 getReferenceValue(uint32 referenceIndex) override
{
if (referenceIndex < 32)
return cpu->GetRegValue(0, referenceIndex);
@ -131,14 +131,14 @@ public:
return -1;
}
virtual ExpressionType getReferenceType(uint32 referenceIndex) {
ExpressionType getReferenceType(uint32 referenceIndex) override {
if (referenceIndex & REF_INDEX_IS_FLOAT) {
return EXPR_TYPE_FLOAT;
}
return EXPR_TYPE_UINT;
}
virtual bool getMemoryValue(uint32 address, int size, uint32& dest, char* error)
bool getMemoryValue(uint32 address, int size, uint32& dest, char* error) override
{
switch (size)
{

View File

@ -27,77 +27,77 @@ class MIPSDebugInterface : public DebugInterface
{
MIPSState *cpu;
public:
MIPSDebugInterface(MIPSState *_cpu){cpu=_cpu;}
virtual const char *disasm(unsigned int address, unsigned int align);
virtual int getInstructionSize(int instruction) {return 4;}
virtual bool isAlive();
virtual bool isBreakpoint(unsigned int address);
virtual void setBreakpoint(unsigned int address);
virtual void clearBreakpoint(unsigned int address);
virtual void clearAllBreakpoints();
virtual void toggleBreakpoint(unsigned int address);
virtual unsigned int readMemory(unsigned int address);
virtual unsigned int getPC() { return cpu->pc; }
virtual void setPC(unsigned int address) {cpu->pc = address;}
virtual void step() {}
virtual void runToBreakpoint();
virtual int getColor(unsigned int address);
virtual std::string getDescription(unsigned int address);
virtual bool initExpression(const char* exp, PostfixExpression& dest);
virtual bool parseExpression(PostfixExpression& exp, u32& dest);
MIPSDebugInterface(MIPSState *_cpu) { cpu = _cpu; }
const char *disasm(unsigned int address, unsigned int align) override;
int getInstructionSize(int instruction) override { return 4; }
bool isAlive() override;
bool isBreakpoint(unsigned int address) override;
void setBreakpoint(unsigned int address) override;
void clearBreakpoint(unsigned int address) override;
void clearAllBreakpoints() override;
void toggleBreakpoint(unsigned int address) override;
unsigned int readMemory(unsigned int address) override;
unsigned int getPC() override { return cpu->pc; }
void setPC(unsigned int address) override { cpu->pc = address; }
void step() override {}
void runToBreakpoint() override;
int getColor(unsigned int address) override;
std::string getDescription(unsigned int address) override;
bool initExpression(const char* exp, PostfixExpression& dest) override;
bool parseExpression(PostfixExpression& exp, u32& dest) override;
//overridden functions
const char *GetName();
int GetGPRSize() { return GPR_SIZE_32;}
u32 GetGPR32Value(int reg) {return cpu->r[reg];}
u32 GetPC() {return cpu->pc;}
u32 GetLR() {return cpu->r[MIPS_REG_RA];}
void SetPC(u32 _pc) {cpu->pc=_pc;}
const char *GetName() override;
int GetGPRSize() override { return GPR_SIZE_32; }
u32 GetGPR32Value(int reg) override { return cpu->r[reg]; }
u32 GetPC() override { return cpu->pc; }
u32 GetLR() override { return cpu->r[MIPS_REG_RA]; }
void SetPC(u32 _pc) override { cpu->pc = _pc; }
const char *GetCategoryName(int cat)
const char *GetCategoryName(int cat) override
{
const char *names[3] = {("GPR"),("FPU"),("VFPU")};
return names[cat];
}
int GetNumCategories() { return 3; }
int GetNumRegsInCategory(int cat)
int GetNumCategories() override { return 3; }
int GetNumRegsInCategory(int cat) override
{
int r[3] = {32,32,32};
return r[cat];
}
const char *GetRegName(int cat, int index);
const char *GetRegName(int cat, int index) override;
virtual void PrintRegValue(int cat, int index, char *out)
void PrintRegValue(int cat, int index, char *out) override
{
switch (cat)
{
case 0: sprintf(out, "%08X", cpu->r[index]); break;
case 1: sprintf(out, "%f", cpu->f[index]); break;
case 2: sprintf(out, "N/A"); break;
case 0: sprintf(out, "%08X", cpu->r[index]); break;
case 1: sprintf(out, "%f", cpu->f[index]); break;
case 2: sprintf(out, "N/A"); break;
}
}
u32 GetHi()
u32 GetHi() override
{
return cpu->hi;
}
u32 GetLo()
u32 GetLo() override
{
return cpu->lo;
}
void SetHi(u32 val)
void SetHi(u32 val) override
{
cpu->hi = val;
}
void SetLo(u32 val)
void SetLo(u32 val) override
{
cpu->lo = val;
}
u32 GetRegValue(int cat, int index)
u32 GetRegValue(int cat, int index) override
{
u32 temp;
switch (cat)
@ -118,7 +118,7 @@ public:
}
}
void SetRegValue(int cat, int index, u32 value)
void SetRegValue(int cat, int index, u32 value) override
{
switch (cat)
{

View File

@ -22,6 +22,6 @@
class PSPMixer : public PMixer
{
public:
int Mix(short *stereoout, int numSamples);
int Mix(short *stereoout, int numSamples) override;
};