Author Topic: Patch for codeblocks 20.03 adding multi columns in memory dump  (Read 18713 times)

Offline MicroSourceCode

  • Multiple posting newcomer
  • *
  • Posts: 27
Patch for codeblocks 20.03 adding multi columns in memory dump
« on: February 11, 2021, 10:37:16 am »
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
« Last Edit: March 14, 2021, 07:57:42 pm by MicroSourceCode »

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Patch for codeblocks 20.03 adding multi columns in memory dump
« Reply #1 on: February 11, 2021, 03:26:29 pm »
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!

Offline MicroSourceCode

  • Multiple posting newcomer
  • *
  • Posts: 27
Re: Patch for codeblocks 20.03 adding multi columns in memory dump
« Reply #2 on: February 12, 2021, 06:16:42 pm »
Can you please create a ticket in sourceforge?

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

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Patch for codeblocks 20.03 adding multi columns in memory dump
« Reply #3 on: February 12, 2021, 06:22:43 pm »
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!]

Offline MicroSourceCode

  • Multiple posting newcomer
  • *
  • Posts: 27
Re: Patch for codeblocks 20.03 adding multi columns in memory dump
« Reply #4 on: February 12, 2021, 08:09:06 pm »
It is not difficult for me to adapt the patch for the svn version. There are no big differences.

Offline MicroSourceCode

  • Multiple posting newcomer
  • *
  • Posts: 27
Re: Patch for codeblocks 20.03 adding multi columns in memory dump
« Reply #5 on: February 13, 2021, 08:48:23 am »
I have sent a pull request to github, if everything goes well, it will appear in an updated version of the program. ;)


Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Patch for codeblocks 20.03 adding multi columns in memory dump
« Reply #6 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

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Patch for codeblocks 20.03 adding multi columns in memory dump
« Reply #7 on: February 14, 2021, 12:56:48 am »
Ok, i found out that memoryWatches are not updated on cursor change?
@Obfuscated do you remember why?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Patch for codeblocks 20.03 adding multi columns in memory dump
« Reply #8 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.
(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!]

Offline MicroSourceCode

  • Multiple posting newcomer
  • *
  • Posts: 27
Re: Patch for codeblocks 20.03 adding multi columns in memory dump
« Reply #9 on: February 14, 2021, 10:05:28 am »
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?
 
 

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Patch for codeblocks 20.03 adding multi columns in memory dump
« Reply #10 on: February 14, 2021, 11:03:10 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!]

Offline MicroSourceCode

  • Multiple posting newcomer
  • *
  • Posts: 27
Re: Patch for codeblocks 20.03 adding multi columns in memory dump
« Reply #11 on: February 14, 2021, 12:25:27 pm »
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?
 


Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Patch for codeblocks 20.03 adding multi columns in memory dump
« Reply #12 on: February 14, 2021, 02:27:21 pm »
What is wxT("/common/font_size_dialog")?
(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!]

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Patch for codeblocks 20.03 adding multi columns in memory dump
« Reply #13 on: February 14, 2021, 02:35:29 pm »
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!]

Offline MicroSourceCode

  • Multiple posting newcomer
  • *
  • Posts: 27
Re: Patch for codeblocks 20.03 adding multi columns in memory dump
« Reply #14 on: February 14, 2021, 06:51:41 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>