-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Qt: Implement Debugger (part 1 of ∞) #6076
Conversation
da91bf6
to
50a27cc
Compare
|
||
RegisterColumn::RegisterColumn(RegisterType type, std::function<u64()> get, | ||
std::function<void(u64)> set) | ||
: m_type(type), m_get_register(get), m_set_register(set) |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
setData(DATA_TYPE, static_cast<quint32>(type)); | ||
} | ||
|
||
RegisterDisplay RegisterColumn::GetDisplay() |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
case RegisterDisplay::Float: | ||
{ | ||
float f = text().toFloat(&valid); | ||
value = *reinterpret_cast<u32*>(&f); |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
text = QString::number(static_cast<quint32>(m_value)); | ||
break; | ||
case RegisterDisplay::Float: | ||
text = QString::number(*reinterpret_cast<float*>(&m_value)); |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
#pragma once | ||
|
||
#include <QDockWidget> | ||
#include <QTableWidget> |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
#include <QDockWidget> | ||
#include <QTableWidget> | ||
|
||
#include <functional> |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
c49b96f
to
67e089c
Compare
Just a little precision for the comments in RegisterColumn.h, the lr is the link register, the cr is the condition register, the fpsctr is the floating point status and control register and the ctr is the count register. I am not too knowledgeable about the other ones marked as ?? |
These are detailed in PPC user manuals. In some of them, there is an "Acronyms and Abbreviated Terms" table.
|
AddRegister(28, 5, RegisterType::dar, "DAR", [] { return PowerPC::ppcState.spr[SPR_DAR]; }, | ||
[](u64 value) { PowerPC::ppcState.spr[SPR_DAR] = value; }); | ||
|
||
// DAR |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
|
||
namespace Config | ||
{ | ||
const ConfigInfo<bool> DEBUGGER_SHOW_REGISTERS({System::Main, "Interface", |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Source/Core/DolphinQt2/Settings.cpp
Outdated
@@ -6,10 +6,13 @@ | |||
#include <QSettings> | |||
#include <QSize> | |||
|
|||
#include <iostream> |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
@sepalani Actually looked at that table a bunch of times but was too lazy to fill them in thus far. Thanks for reminding me. |
67e089c
to
6031fe5
Compare
6eb593f
to
a9a01e9
Compare
There isn't very much feedback when turn on debug UI is hit. I know not saving it is probably fine, but, I didn't even notice it was working. I can't seem to launch any games to see if the registers are actually working. |
620edec
to
74cf2bd
Compare
@JMC47 I think that issue will be gone once the toolbar buttons are implemented. About the UI crashing when a game is launched: I can't confirm it on Linux, so it seems to be a platform specific issue. Will have to debug it under Windows later. |
7385e2c
to
b1b07ec
Compare
Rebased and finished this off. I'll implement the other missing features / widgets in another PR. |
I tested this a bit more with the more complete setup. It appears setting breakpoints and such work. I do get a bit confused by the way you can move windows around, but it's actually more robust than WX and probably just something I should learn to handle. |
@JMC47 actually, that was possible in wx, you could move the window around and dock them as well as having them float. However, it seems the Qt version offers more pleasing animation when you do so. You do need to move the header bar instead of the tab which threw me off a bit (I am very used to WX), but once I got that, it was fine. Now, I just did some testing with this UI as I said, I am very used to the WX debugger and since this is a partial commit and I know Qt is in the work, I noticed a couple of issues, but I don't know if any of them are intentional or unintentional so I might as well list them.
That seems to be what I noticed. I do like the use of docker here and how they move with better animation than WX. I also am for the merging of the instruction breakpoint and memory breakpoint, it actually feels weird I didn't thought about doing it now because it does feel simpler :) Other than the issues I mentioned, that makes me look forward to this debugger, it just feels a bit nicer to work with. |
Just leaving this here in case it's useful, but x64dbg is also something that could be used as a reference/prior work for some things, particularly considering it's also written with Qt as well. |
@lioncash I'll definitely have a look at it. Thanks. |
@aldelaro5 Thanks for your feedback!
Fixed the FPR column and made all columns resizable.
Using checkboxes now, so this is fixed as well.
After some asking around in IRC it seems like those last two issues don't seem to be Qt related, so I can't do anything about them. |
Rebased and ready to roll. |
This implements
The rest will be implemented in a later PR