1udo6arre / svd-tools

This repository groups a set of tools using svd features for debuging...
GNU General Public License v2.0
24 stars 6 forks source link

gdb-svd: add 'dump' command to store registers values to file #2

Closed ABOSTM closed 2 years ago

ABOSTM commented 2 years ago

gdb-svd: add 'dump' command to store registers values to file

ex: (gdb) svd dump c:\tmps\dump.txt (gdb) svd dump c:\tmps\dump.txt ADC1

erwango commented 2 years ago

Since the final target of this feature is to be able to compare 2 files and directly see the differences of configuration between 2 set ups, I think it would be great to take full advantage of the SVD file and dump the whole values with whole description ( the result you get with a svd get <perph> applied to all periph... This would be a bit longer I imagine, but you only do it once and this is used for "off debugger" analysis. Then, when comparing 2 files you not only get where the difference is but also what it impacts and then you can focus directly on registers where difference makes sense in your use case.

erwango commented 2 years ago

Since the final target of this feature is to be able to compare 2 files and directly see the differences of configuration between 2 set ups, I think it would be great to take full advantage of the SVD file and dump the whole values with whole description ( the result you get with a svd get <perph> applied to all periph... This would be a bit longer I imagine, but you only do it once and this is used for "off debugger" analysis. Then, when comparing 2 files you not only get where the difference is but also what it impacts and then you can focus directly on registers where difference makes sense in your use case.

Ok, this is indeed what you get when opening the file, this is great... I've been tricked by the console output:

(gdb) svd dump wl_zephyr_pm.txt
Print to file: wl_zephyr_pm.txt
0x40012400: 00000000 

0x40012404: 00000000 
erwango commented 2 years ago

One request: In dump mode, the syntax highlighting need to be disabled as this makes file comparison much less readable

ABOSTM commented 2 years ago

One request: In dump mode, the syntax highlighting need to be disabled as this makes file comparison much less readable

Added :-)

1udo6arre commented 2 years ago

Hi Alex

great feature, I just fixed an issue on command completion. I merge the pull request, and I will push the fix after.

Regard Ludo