Author Topic: Patch for changing the values of registers via the CPU Register window  (Read 20906 times)

Offline MicroSourceCode

  • Multiple posting newcomer
  • *
  • Posts: 27
An experimental patch for changing the values of registers via the CPU Register window. AVR and STM32. The project must be created through a standard wizard project: ARM project, AVR project.

The patch does not affect the debugging of other languages, the window for changing the register value appears only if you debug AVR or STM32 microcontrollers. Made for Unix users, Windows users can use EmBlocks, etc.

Download:
https://github.com/MicroSourceCode/cb20.03-cpuregisters
« Last Edit: July 14, 2022, 07:17:39 pm by MicroSourceCode »

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Patch for changing the values of registers via the CPU Register window
« Reply #1 on: December 14, 2021, 09:11:31 am »
An experimental patch for changing the values of registers via the CPU Register window. AVR and STM32.

The patch does not affect the debugging of other languages, the window for changing the register value appears only if you debug AVR or STM32 microcontrollers. Made for Unix users, Windows users can use EmBlocks, etc.

You post the same thread twice?
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Patch for changing the values of registers via the CPU Register window
« Reply #2 on: December 14, 2021, 11:18:48 am »
I like this,
some comments:
1) the patch seems to contain some *.orig files. I think they are wrong?
2) Why only linux? Are there some limitations for windows machines (system calls?), or simply not tested?
3) in general Is it possible to modify cpu register also on x86?
4) Can you post this on source forge? Here it will get lost...

Offline MicroSourceCode

  • Multiple posting newcomer
  • *
  • Posts: 27
Re: Patch for changing the values of registers via the CPU Register window
« Reply #3 on: December 14, 2021, 02:34:29 pm »
1. Erroneous inclusion of the file.
2. It should also work in Windows, I didn't check it.
3. Yes it is possible, the meaning of this? When using C++ or C, you will see incomprehensible data, due to the code optimizer.
4. SourceForge = github.com. SourceForge is a very ancient mammoth. Github has a search and in general it is better.


Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1553
Re: Patch for changing the values of registers via the CPU Register window
« Reply #4 on: December 14, 2021, 02:46:02 pm »
He is referring to the C::B ticket site, hosted in Sourceforge:

https://sourceforge.net/p/codeblocks/tickets/

Offline MicroSourceCode

  • Multiple posting newcomer
  • *
  • Posts: 27
Re: Patch for changing the values of registers via the CPU Register window
« Reply #5 on: December 15, 2021, 04:29:28 pm »
He is referring to the C::B ticket site, hosted in Sourceforge:

https://sourceforge.net/p/codeblocks/tickets/

Thank you for the explanation.

Offline AndrewCot

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 678
Re: Patch for changing the values of registers via the CPU Register window
« Reply #6 on: December 16, 2021, 01:55:08 am »
The following wiki page has info on creating the patch and submitting it via sourceforge.
    https://wiki.codeblocks.org/index.php/Creating_a_patch_to_submit_(Patch_Tracker)


To save you pulling your hair out w.r.t. SVN usage I use the following to generate a patch file that can be submitted:

1. git svn clone --revision 12579 http://svn.code.sf.net/p/codeblocks/code/trunk
2. Copy the trunk so you have a backup
3. Update the code in trunk
4. Stage any new files
5. git diff git-svn --unified --no-prefix --output=changes.patch


It looks like the patch file you created may not have the correct directory references to be applied to the SF SVN repo. You can check by applying the patch in step 3 above to see if the patch is okay or not.

Edit: Make the link work
« Last Edit: August 17, 2022, 11:14:54 am by MortenMacFly »