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
Debugger MemoryWidget: Add dual views #10578
Debugger MemoryWidget: Add dual views #10578
Conversation
1d7474a
to
e7d3291
Compare
If I added a hex64 view type the mismatch for Double vs two hex32 columns could be corrected by displaying one hex64 column instead. Hex64 wouldn't need a UI option. If it's easier to read two hex32's then I'll just leave it with a few special rules to deal with the mismatch. |
You need to rebase this now. Also, I'm not really happy with this approach. I think it would be way more useful if the bytes-per-row still worked as set, Some extra spacing between the two halves couldn't hurt either. |
…t column to be Hex32.
e7d3291
to
cc22f1a
Compare
First was rebase. Second is commit for larger size dual views. I'm not sure if you'll like it, so I left it as a second commit. It gets buggy if I have to stretch the table too far, I forget how to fix that atm. Extra spacing might require an empty column between them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few nitpicks but otherwise this is fine. I'd still like to see a bit of a spacing between the two halves, and the ability to have the same hex view on both sides is kinda weird, though with the UI as-is it makes sense I suppose.
f605f06
to
83909c6
Compare
Trying to just use Hex64 when dual view + double is selected. Should I have it save all the display type settings between sessions? Also haven't worked on breakpoints yet. |
@@ -91,31 +92,34 @@ static int GetTypeSize(MemoryViewWidget::Type type) | |||
|
|||
static int GetCharacterCount(MemoryViewWidget::Type type) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you plan to include the space, what about GetCellSize
as a function name? Can't this function be marked as constexpr
. I also highly suggest that for each case, you write an example.
For instance:
case MemoryViewWidget::Type::Unsigned32: // UINT_MAX = 4294967295
return 11;
case MemoryViewWidget::Type::Float32: // FLT_MAX = 3.40282e+38
case MemoryViewWidget::Type::Signed32: // INT_MIN = -2147483648
return 12;
EDIT: Some constants that might be interesting to look at https://en.cppreference.com/w/cpp/types/climits
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I don't think it will be used for anything else. I can add examples too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually the cell size needs to be calculated from the font, so I think CharacterCount is most accurate.
83909c6
to
1c8979b
Compare
Tried a solution to row breakpoints. |
I can still get the row breakpoints to break with this. But again, I wouldn't worry about it, it can be fixed or removed in a separate PR. Your commits are also now a combined thing of multiple features in one commit, which is far worse than row breakpoints being screwy. |
I would also argue that the Dual View checkbox not doing anything in Hex view is worse than it displaying two Hex views, from a discoveryability perspective. |
1c8979b
to
a7111e3
Compare
My goal isn't to change the features of row breakpoints, but to keep them from breaking. I think some of the breaking happened in the previous PR though, so I can move the changes to a new PR if you want. Either way I think I got them fixed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I'm okay with this now.
Relies on #10563. Restores the dual views ability that WX had, and improves on it.
Looking for input on how customizable it should be. Currently it's always 4 bytes per row and the left side is always hex. It auto chooses the size/columns based on what is on the right. The second display type box, for bytes per row, doesn't do anything in dual view, because it's always 4 bytes or 8 bytes for a double.
I think the left side always being hex is fine.
Currently Double has a small breakpoint display bug. I also just added the Hex8/Hex16 ability to the left side, so it got a little more complicated than just having Hex32. I'll maybe need to clean it up more.