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

Paul_Koning@Dell.com Paul_Koning@Dell.com
Mon Jan 25 18:22:00 GMT 2016


> 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



More information about the Gdb-patches mailing list