Skip to content
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

[WIP] Thread widget #8686

Draft
wants to merge 1 commit into
base: master
from
Draft

[WIP] Thread widget #8686

wants to merge 1 commit into from

Conversation

@sepalani
Copy link
Contributor

sepalani commented Mar 22, 2020

This a very early WIP PR. I mostly would like feedback regarding the features that might be wanted for this widget and also the design since I'm really not a UI/UX person.

The goal of this new Widget is to display user thread information (not kernel/IOS thread). Regarding the pieces of information I can get:

  • Using the Dolphin OS Globals
    • current/defaut thread address
    • thread queue address
  • Using OSThread structure
    • thread's context (saved registers)
    • thread's stack
    • thread's state and attr
    • thread's priority
    • thread's error value
    • thread's data (often used by 3rd party libraries to store the thread name)
    • ...
  • Using LWPThread structure
    • Planned but out-of-scope of this PR

WIP Screenshot :
image

I plan to add under the State GroupBox a table with the list of the current active threads with some properties and eventually:

  • next to each thread a button to display the context and other properties in another window,
  • or maybe select the thread to display under this table its properties in another groupbox or table.

I also plan to add a context menu to "View in Code, in Memory, Add Breakpoint, Add Memory BPs" with the thread properties.

Any suggestions are welcome.

Copy link
Member

lioncash left a comment

Mostly just a minor cursory overview

{
m_state = new QGroupBox(tr("State"));

auto create_line_edit = []() {

This comment has been minimized.

Copy link
@lioncash

lioncash Mar 22, 2020

Member
Suggested change
auto create_line_edit = []() {
const auto create_line_edit = [] {
if (!isVisible() || Core::GetState() != Core::State::Paused)
return;

auto get_address_as_text = [](u32 addr) {

This comment has been minimized.

Copy link
@lioncash

lioncash Mar 22, 2020

Member
Suggested change
auto get_address_as_text = [](u32 addr) {
const auto get_address_as_text = [](u32 addr) {

class QGroupBox;
class QLineEdit;
class QCloseEvent;

This comment has been minimized.

Copy link
@lioncash

lioncash Mar 22, 2020

Member

These should be alphabetically organized


void Settings::SetThreadsVisible(bool enabled)
{
if (IsThreadsVisible() != enabled)

This comment has been minimized.

Copy link
@lioncash

lioncash Mar 22, 2020

Member

This can be inverted for an early return and to unindent the contained code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.