mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-01-29 11:54:36 +01:00
* Remove m_current_choice, it's not correct to rely on thread name entry. In extreme corner cases a newly thread can be created, old destroyed with the same entry name. (reoccuring LV2 SPU/PPU ID) * Remove m_no_thread_selected, can be easily replaced with std::weak_ptr expired() function and is more accurate this way. * In HandleBreakpointRequest: only remove breakpoint on valid PPU thread and not any thread! also fix potential nullptr deref if thread has recently been destroyed.
48 lines
1.2 KiB
C++
48 lines
1.2 KiB
C++
#pragma once
|
|
|
|
#include "stdafx.h"
|
|
|
|
#include <QListWidget>
|
|
|
|
class breakpoint_handler;
|
|
class CPUDisAsm;
|
|
class cpu_thread;
|
|
class gui_settings;
|
|
|
|
class debugger_list : public QListWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
u32 m_pc = 0;
|
|
u32 m_item_count = 30;
|
|
QColor m_color_bp;
|
|
QColor m_color_pc;
|
|
QColor m_text_color_bp;
|
|
QColor m_text_color_pc;
|
|
|
|
Q_SIGNALS:
|
|
void BreakpointRequested(u32 loc);
|
|
public:
|
|
debugger_list(QWidget* parent, std::shared_ptr<gui_settings> settings, breakpoint_handler* handler);
|
|
void UpdateCPUData(std::weak_ptr<cpu_thread> cpu, std::shared_ptr<CPUDisAsm> disasm);
|
|
public Q_SLOTS:
|
|
void ShowAddress(u32 addr, bool force = false);
|
|
protected:
|
|
void keyPressEvent(QKeyEvent* event) override;
|
|
void mouseDoubleClickEvent(QMouseEvent* event) override;
|
|
void wheelEvent(QWheelEvent* event) override;
|
|
void resizeEvent(QResizeEvent* event) override;
|
|
private:
|
|
/**
|
|
* It really upsetted me I had to copy this code to make debugger_list/frame not circularly dependent.
|
|
*/
|
|
u32 GetCenteredAddress(u32 address) const;
|
|
|
|
std::shared_ptr<gui_settings> xgui_settings;
|
|
|
|
breakpoint_handler* m_breakpoint_handler;
|
|
std::weak_ptr<cpu_thread> cpu;
|
|
std::shared_ptr<CPUDisAsm> m_disasm;
|
|
};
|