Add thread debugger

This commit is contained in:
wheremyfoodat 2025-07-03 16:58:56 +03:00
parent 228068901b
commit 9932e58bf0
10 changed files with 172 additions and 14 deletions

View file

@ -21,6 +21,7 @@
#include "panda_qt/screen.hpp"
#include "panda_qt/shader_editor.hpp"
#include "panda_qt/text_editor.hpp"
#include "panda_qt/thread_debugger.hpp"
#include "services/hid.hpp"
struct CheatMessage {
@ -109,6 +110,7 @@ class MainWindow : public QMainWindow {
TextEditorWindow* luaEditor;
PatchWindow* patchWindow;
ShaderEditorWindow* shaderEditor;
ThreadDebugger* threadDebugger;
// We use SDL's game controller API since it's the sanest API that supports as many controllers as possible
SDL_GameController* gameController = nullptr;
@ -157,4 +159,7 @@ class MainWindow : public QMainWindow {
void handleScreenResize(u32 width, u32 height);
void handleTouchscreenPress(QMouseEvent* event);
signals:
void emulatorPaused();
};

View file

@ -0,0 +1,28 @@
#pragma once
#include <QString>
#include <QTableWidget>
#include <QTimer>
#include <QVBoxLayout>
#include <QtWidgets>
#include <atomic>
#include <chrono>
#include <thread>
#include "emulator.hpp"
class ThreadDebugger : public QWidget {
Q_OBJECT
Emulator* emu;
QVBoxLayout* mainLayout;
QTableWidget* threadTable;
public:
ThreadDebugger(Emulator* emu, QWidget* parent = nullptr);
void update();
private:
void setListItem(int row, int column, const QString& str);
void setListItem(int row, int column, const std::string& str);
};