mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
ImDebugger register window: Show fpcond on FPU tab. Fix display issue in kernelobj window
This commit is contained in:
parent
a265119773
commit
a74e4a105c
4 changed files with 22 additions and 14 deletions
|
@ -26,7 +26,7 @@ struct MemMap;
|
|||
|
||||
class DebugInterface {
|
||||
public:
|
||||
virtual int getInstructionSize(int instruction) {return 1;}
|
||||
virtual int getInstructionSize(int instruction) = 0;
|
||||
|
||||
virtual bool isAlive() = 0;
|
||||
virtual bool isBreakpoint(unsigned int address) = 0;
|
||||
|
@ -47,6 +47,7 @@ public:
|
|||
virtual u32 GetHi() = 0;
|
||||
virtual u32 GetLo() = 0;
|
||||
virtual u32 GetLLBit() = 0;
|
||||
virtual u32 GetFPCond() = 0;
|
||||
|
||||
virtual void SetHi(u32 val) { };
|
||||
virtual void SetLo(u32 val) { };
|
||||
|
|
|
@ -481,8 +481,7 @@ u32 sceKernelIcacheClearAll()
|
|||
return 0;
|
||||
}
|
||||
|
||||
void KernelObject::GetQuickInfo(char *ptr, int size)
|
||||
{
|
||||
void KernelObject::GetQuickInfo(char *ptr, int size) {
|
||||
strcpy(ptr, "-");
|
||||
}
|
||||
|
||||
|
|
|
@ -53,6 +53,7 @@ public:
|
|||
|
||||
u32 GetPC() override { return cpu->pc; }
|
||||
u32 GetLR() override { return cpu->r[MIPS_REG_RA]; }
|
||||
u32 GetFPCond() override { return cpu->fpcond; }
|
||||
void DisAsm(u32 pc, char *out, size_t outSize) override;
|
||||
void SetPC(u32 _pc) override { cpu->pc = _pc; }
|
||||
|
||||
|
|
|
@ -48,18 +48,17 @@ void DrawRegisterView(MIPSDebugInterface *mipsDebug, bool *open) {
|
|||
ImGui::TableSetupColumn("regname", ImGuiTableColumnFlags_WidthFixed);
|
||||
ImGui::TableSetupColumn("value", ImGuiTableColumnFlags_WidthFixed);
|
||||
ImGui::TableSetupColumn("value_i", ImGuiTableColumnFlags_WidthStretch);
|
||||
ImGui::TableNextRow();
|
||||
|
||||
auto gprLine = [&](const char *regname, int value) {
|
||||
ImGui::TableSetColumnIndex(0);
|
||||
ImGui::TableNextRow();
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::TextUnformatted(regname);
|
||||
ImGui::TableSetColumnIndex(1);
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::Text("%08x", value);
|
||||
if (value >= -1000000 && value <= 1000000) {
|
||||
ImGui::TableSetColumnIndex(2);
|
||||
ImGui::Text("%d", value);
|
||||
}
|
||||
ImGui::TableNextRow();
|
||||
};
|
||||
for (int i = 0; i < 32; i++) {
|
||||
gprLine(mipsDebug->GetRegName(0, i).c_str(), mipsDebug->GetGPR32Value(i));
|
||||
|
@ -78,19 +77,27 @@ void DrawRegisterView(MIPSDebugInterface *mipsDebug, bool *open) {
|
|||
ImGui::TableSetupColumn("regname", ImGuiTableColumnFlags_WidthFixed);
|
||||
ImGui::TableSetupColumn("value", ImGuiTableColumnFlags_WidthFixed);
|
||||
ImGui::TableSetupColumn("value_i", ImGuiTableColumnFlags_WidthStretch);
|
||||
|
||||
// fpcond
|
||||
ImGui::TableNextRow();
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::TextUnformatted("fpcond");
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::Text("%08x", mipsDebug->GetFPCond());
|
||||
|
||||
for (int i = 0; i < 32; i++) {
|
||||
float fvalue = mipsDebug->GetFPR32Value(i);
|
||||
u32 fivalue;
|
||||
memcpy(&fivalue, &fvalue, sizeof(fivalue));
|
||||
ImGui::TableSetColumnIndex(0);
|
||||
ImGui::TextUnformatted(mipsDebug->GetRegName(1, i).c_str());
|
||||
ImGui::TableSetColumnIndex(1);
|
||||
ImGui::Text("%0.7f", fvalue);
|
||||
ImGui::TableSetColumnIndex(2);
|
||||
ImGui::Text("%08x", fivalue);
|
||||
ImGui::TableNextRow();
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::TextUnformatted(mipsDebug->GetRegName(1, i).c_str());
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::Text("%0.7f", fvalue);
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::Text("%08x", fivalue);
|
||||
}
|
||||
|
||||
ImGui::EndTable();
|
||||
}
|
||||
ImGui::EndTabItem();
|
||||
|
@ -227,7 +234,7 @@ static void DrawKernelObjects(ImConfig &cfg) {
|
|||
ImGui::End();
|
||||
return;
|
||||
}
|
||||
if (ImGui::BeginTable("kos", 5, ImGuiTableFlags_RowBg | ImGuiTableFlags_BordersH)) {
|
||||
if (ImGui::BeginTable("kos", 4, ImGuiTableFlags_RowBg | ImGuiTableFlags_BordersH | ImGuiTableFlags_Resizable)) {
|
||||
ImGui::TableSetupColumn("ID", ImGuiTableColumnFlags_WidthFixed);
|
||||
ImGui::TableSetupColumn("Type", ImGuiTableColumnFlags_WidthFixed);
|
||||
ImGui::TableSetupColumn("Name", ImGuiTableColumnFlags_WidthFixed);
|
||||
|
|
Loading…
Add table
Reference in a new issue