Skip to content
This repository was archived by the owner on Feb 20, 2024. It is now read-only.

Memorydump update #16

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Memorydump update #16

wants to merge 5 commits into from

Conversation

MicroSourceCode
Copy link

@MicroSourceCode MicroSourceCode commented Feb 13, 2021

MemoryDump update. I left all the new functions, I checked the patch, everything works.

@obfuscated
Copy link
Owner

Why have you closed it?

@MicroSourceCode
Copy link
Author

Why have you closed it?

It is not clear whether it is necessary or not. If needed. I will create a request again. cbMemoryView conflicts with cbSystemView. BlueHazzard create cbMemoryView plugin only for test target.

@obfuscated
Copy link
Owner

There is a reopen button....

@obfuscated obfuscated reopened this Feb 14, 2021
@bluehazzard
Copy link
Contributor

Why have you closed it?

It is not clear whether it is necessary or not. If needed. I will create a request again. cbMemoryView conflicts with cbSystemView. BlueHazzard create cbMemoryView plugin only for test target.

My plugin is not part of the official codeblocks installation. I just mentioned in the forum, because it is related...
Anyway, i have updated it and fixed some bugs...

Adding descriptions of how plugins work
How is it calculated 128 number in m_LineText
@MicroSourceCode
Copy link
Author

MicroSourceCode commented Feb 15, 2021

Added comments about change in plugin

@@ -38,17 +37,24 @@ ExamineMemoryDlg::ExamineMemoryDlg(wxWindow* parent) :
return;
m_pText = XRCCTRL(*this, "txtDump", wxTextCtrl);

wxFont font(8, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL);
wxFont font(12, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why have you increased the size?

@@ -7,26 +7,26 @@
<object class="wxBoxSizer">
<object class="sizeritem">
<object class="wxStaticText" name="ID_STATICTEXT1">
<label>Address:</label>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't abbreviate things. The abbreviation of "address" is more common to be "addr" also.

<border>2</border>
</object>
<object class="sizeritem">
<object class="wxComboBox" name="colSelect">
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use wxChoice they work better on wxGTK.

}
}

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Empty space?

#define HEX_OFFSET(a) (a*3)
#define CHAR_OFFSET(a) (16*3 + 3 + a)
#define HEX_OFFSET(a) (a*3)
//#define CHAR_OFFSET(a) (16*3 + 3 + a)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you don't use this any more you better remove this.

protected:
void OnGo(wxCommandEvent& event);

private:
wxTextCtrl* m_pText;
size_t m_ByteCounter;
wxChar m_LineText[67]; // 16*3 "7F " + 3 " " + 16 "."
unsigned m_ColumnsCtrl;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Naming something ctrl means it is the actual variable to the control. Please use just m_Columns or m_NumColumns.

m_pText->AppendText(m_LineText[i]);

// for (int i = 0; i < (m_PartLength + m_ColumnsCtrl); ++i)
// m_LineText[i] = _T(' ');
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The identation of this block is a mess. Please fix.

m_pText->Clear();
m_LastRowStartingAddress = 0;
m_ByteCounter = 0;
for (int i = 0; i < 67; ++i)

m_PartLength = (m_ColumnsCtrl * 2) + m_ColumnsCtrl;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this mean? Why do you just multiply by 3?

@MicroSourceCode
Copy link
Author

It's funny, but I can't edit commits. This action is not possible.

@obfuscated
Copy link
Owner

Why do you want to edit commits? Just push new commits to your branch and this PR would be updated.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants