- The address argument can now be an expression (e.g. &array), it's no longer restricted to being just a number literal.
- The -o (offset) option is now properly handled, not just silently ignored.
- The --thread option is now properly handled.
- A new --frame option has been added for consistency with GDB.
- Added a new test to verify old and new functionality.
|730 ↗||(On Diff #24936)|
GDB sets the block offset to something other than zero in cases where the specified memory range has inaccessible regions, in that case it may return one or more blocks where begin != (address + byte-offset) and therefore the block offset will be (begin - (address + byte-offset)) > 0, where address and byte-offset correspond to the arguments passed into -data-read-memory-bytes. The way GDB deals with inaccessible regions is described in the MI spec, but the current implementation in LLDB-MI doesn't do any of that. In LLDB-MI the command only succeeds if the entire memory range is read successfully, if any of it is inaccessible the command simply returns an error.
I suppose the title I chose for this patch is not entirely accurate, my changes bring us closer to complying with the MI spec, but there's still some way to go :)