Re: [PATCH v2 0/7] Support reading/writing memory on architectures with non 8-bits addressable memory

Pedro Alves
2015-05-21T17:44:46Z

On 04/15/2015 08:47 PM, Simon Marchi wrote:
>
> For RSP's m, M and X packets, the "length" parameters are used to
> correctly encode or decode the packet at a low level, where we don't
> want to have to deal with different target byte sizes. Also, for a
> network protocol, it would make sense to use a fixed-sized unit.
> Therefore, it would be easier if those lengths were always in bytes.
> Here is an example that corresponds to the previous MI example.

This confuses me and gives me lots of pause. My immediate reaction
is, "well, that's odd. what's different compared to MI here?". I'm
not imagining what exactly ends up being easier?

But anyway, I guess it's a small detail. I'll review ignoring
that.

>
> -> $m1000,8#??
> <- aaaabbbbccccdddd
>
> -> $M1000,6:eeeeffffeeee#??
> <- OK
>
> -> $m1000,8#??
> <- eeeeffffeeeedddd
>
> If there are any other RSP packets or MI commands that need such
> clarification, it will be on a case-by-case basis, whatever makes more
> sense for each particular one.

Off hand, I thought of qCRC and qSearch:memory. The latter is
more interesting:

- Would you allow searching for an 1 8-bit byte pattern?

- So what length would you use for that one? Host byte
or addressable units?

Thanks,
Pedro Alves