Re: [PATCH] Add a new format letter to dump instructions backward

Paul_Koning
2016-01-25T18:22:24Z

> On Jan 25, 2016, at 12:52 PM, John Baldwin <jhb@freebsd.org> wrote:
>
> On Monday, January 25, 2016 11:41:27 AM Pedro Alves wrote:
>> On 01/24/2016 09:28 PM, Toshihito Kikuchi wrote:
>> ...
>> #3 - negative repeat counts ?
>>
>> (gdb) x /4i // next 4 instructions
>> (gdb) x /-4i // previous 4 instructions
>> ...
>> #3 feels natural to me. What do you (and others) think?
>
> I think #3 is the most natural as well. I also think this is a
> very useful feature.

Yes, but how do you do instructions backwards if the instruction length is variable? It is entirely possible that there will be multiple possible answers, and no way to tell which one (if any) is "correct".

paul