What I'd like to see is a way to display the null terminated array as a hex dump , defaulting to 256 (?) bytes (or some other number.) Something like "array as hex dump".
Currently with @test_name[0], changing the properties->style from default to "memory dump" causes a message "cannot read memory for expression", it would be nice if instead it showed 256 (?) hex bytes found at the address of the array, i.e, the array in hex. It would be great if that option was available for any variable being watched. It would provide a quick and easy way of switching from hex to type-formatted display. While I'm dreaming, it would be absolutely great to be able to right click and toggle from "formatted" to "hex dump" for any variable being watched. The "formatted" view would be based on the type specified in the properties.
"@test_name[0]" is a pointer, the pointer itself is not in memory (only the pointed to data).
If you have a PChar and are viewing it as data, then FPDebug handles the special case and finds the 0 terminated end (within a limit).
However if you display this a mem-dump, it wants to display the actual value (which is the pointer and that is not in memory).
You can memdump "test_name", but it will include the repeated #0 at the end. You can use repeat count...
Also (not sure if that currently works) => the chars in the array should be display-format-able (if not yet, then soon). Then you can force them as number/ord, instead of char (again, if not yet, then soon / that is part of my current change in progress). Though as array they are comma separated. As hex dump they are not.
---------------------
mem dump is avail for any variable, if the value of that variable is in memory.
If you enter "100" as watch, the debugger-backend will deliver the value 100. And the frontend can show it has hex, or bin. But the frontend does not know what that variable looks as mem dump. Neither does the backend (though the backend could be taught to create a dummy dump if the type is known / without type the size isn't known).
The frontend does not know how types are laid out in memory. E.g. a packed and non packed record...
So mem-dump is producing its own result data, and therefore must be requested from the backend. And the backend only supports that, if it actually is data that is in memory.
This matters for "debug history". Since this is stored data, no further data can be retrieved.
----------------------
However, the frontend should (if not yet, then soon) be able to display all numbers (in any array or struct) in any one chosen display format.
Mind, that is all: Using FpDebug based backends.
-----------------------
As for shortcuts (toggle memdump) in the context menu => mention in the other thread. Though the question then is which settings should have shortcuts, and why others not (all, will be to many)