News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Patch for codeblocks 20.03 adding multi columns in memory dump

Started by MicroSourceCode, February 11, 2021, 10:37:16 AM

Previous topic - Next topic

MicroSourceCode

Patch for codeblocks 20.03 and svn improves the Memory Dump dockable dialog. I added a list box to it to select the number of columns to display. Something like this is done in modern IDEs like AVR studio and other... This is useful for debugging microcontrollers, viewing commands in their binary format, and more compact display of data. Can select the following number of columns to display: 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32.

In comparison with the original, the display of the address of the first line has been corrected, the end line will also be shown, as a rule it is smaller in some modes.

The wxTextCtrl element has been replaced with wxListBox, which made it possible to refuse to scroll down the list and more conveniently observe the data.

link to patch:
https://github.com/MicroSourceCode/cb20.03-MemoryDump

BlueHazzard

Hi!
Thank you for your work.
Can you please create a ticket in sourceforge? This would help us and prevent it getting lost in the forum.

Thank you again!

MicroSourceCode

Quote from: BlueHazzard on February 11, 2021, 03:26:29 PM
Can you please create a ticket in sourceforge?

Ok, I will try to register on sourceforge and create a ticket.

oBFusCATed

This is not a strict requirement. You can also prepare a pull request on my repo if it is easier for you.
https://github.com/obfuscated/codeblocks_sf
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

MicroSourceCode

It is not difficult for me to adapt the patch for the svn version. There are no big differences.

MicroSourceCode

I have sent a pull request to github, if everything goes well, it will appear in an updated version of the program. ;)


BlueHazzard


BlueHazzard

Ok, i found out that memoryWatches are not updated on cursor change?
@Obfuscated do you remember why?

oBFusCATed

Because they are expensive? I think you've requested it this way.
I'm not sure memory watches and examine memory should be treated the same way using the same API, but I might be wrong.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

MicroSourceCode

Quote from: BlueHazzard on February 13, 2021, 07:05:53 PM
just for reference:
https://github.com/bluehazzard/cbMemoryView

This is a memory view with tabs for multiple memory views

Thank, this very good plugins for memory watch.
What new things are planned to be added to codeblocks? What is the development strategy of the program?


oBFusCATed

Quote from: MicroSourceCode on February 14, 2021, 10:05:28 AM
What new things are planned to be added to codeblocks? What is the development strategy of the program?
We're not an organisation, so there is no common plan/goal. We're just separate developers working on whatever everybody likes.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

MicroSourceCode

On monitor 1920x1080, fonts in debugger windows very small, how temp solution I insert everywhere:

int FontSize = c->ReadInt(wxT("/common/font_size_dialog"), 10);
    wxFont font(FontSize, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL);
    m_pText->SetFont(font);                                           

Is there any other solution?



oBFusCATed

(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

oBFusCATed

Quote from: oBFusCATed on February 14, 2021, 01:19:07 AM
Because they are expensive? I think you've requested it this way.
I'm not sure memory watches and examine memory should be treated the same way using the same API, but I might be wrong.

@bluehazzard: Another reason might be that the request update is expected to come from the UI. Somewhere in your plugin you'll have to probably request an update when you detect that the cursor has changed.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

MicroSourceCode

Quote from: oBFusCATed on February 14, 2021, 02:27:21 PM
What is wxT("/common/font_size_dialog")?

This custom option in default.conf

<debugger_common>
                <common>
                        <disassembly>
                                <MIXED_MODE bool="0" />
                        </disassembly>
                        <examine_memory>
                                <SIZE_TO_SHOW int="128" />
                                <COLUMNS_TO_SHOW int="10" />
                        </examine_memory>
                        <AUTO_BUILD bool="1" />
                        <AUTO_SWITCH_FRAME bool="1" />
                        <DEBUG_LOG bool="0" />
                        <JUMP_ON_DOUBLE_CLICK bool="0" />
                        <REQUIRE_CTRL_FOR_TOOLTIPS bool="0" />
                        <PERSPECTIVE int="2" />
                        <FONT_SIZE_DIALOG int="14" />
                </common>