Modification of values stored in registers of the processor during debugging

You have the GDB console available to you at all times in the Debug Console. The documentation for that can be found here. Generally

set $<register name> = <some value>
set $r0 = 2

E.g. when I put a breakpoint here and R0 is 0:

I execute the set $r0 = 2, print the registers using i r (info registers) and advance one instruction using stepi (PIO’s register view doesn’t update otherwise… but the processor has internally set the requested value).

I then get the expect state

So it is possible using the base GDB. I aggree that a feature like an option like right-clicking and “Edit” or double-clicking the register to change the value would be great. That would be a feature-request for https://github.com/platformio/platformio-vscode-ide/issues/.

grafik

1 Like