> I'm wondering is there a cheap/easy trick to at least force it to 32-bit mode and maybe limit range which will be allowed to access?
I think you can do this in the Debugger Console (or gdbinit)[1]:
mem 0 0 rw 32 cache
---
> I'm afraid that when the memory viewer was designed, these embedded specific issues were not considered... :-(
This is an interesting topic. As far as I understood, this topic involves GDB and downstream tooling. For example, even if CDT's memory view "understood" memory alignment and allowable regions, that would not help users who typed in the Debugger Console, nor
would it prevent derefrencing pointer variables to the same memory. In both of these cases CDT's memory view is not involved.
The way to inform GDB what is safe and what alignment, etc, is to use GDB's mem and related commands[1]. Does that set of commands address your needs? If so, then what may make sense is to provide UI in CDT to setup GDB if the GDB and its associated backend
don't have support for that already. And, even if GDB and its backend support memory regions, then UI to visualize that would be useful, within the Memory view or in a dedicated UI/view.
Finally, it would not surprise me if there are some flow and presentation issues in the Memory views when memory regions are defined. I hope that fixing such issues are not controversial and can be for the common good.