This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


On Monday, January 25, 2016 11:41:27 AM Pedro Alves wrote:
> On 01/24/2016 09:28 PM, Toshihito Kikuchi wrote:
> Seems to me that some other UI would be better.  E.g.,:
> 
>  #1 - a different switch, like "x -back /i " ?
> 
>  #2 - a different command, like "bx" ?
> 
>  #3 - negative repeat counts ?
> 
>    (gdb) x /4i    // next 4 instructions
>    (gdb) x /-4i   // previous 4 instructions
> 
>    (gdb) x /4bx    // next 4 bytes, in hex
>    (gdb) x /-4bx   // previous 4 bytes, in hex
> 
> 
> Added #1 just for completeness, I don't find it very convenient.
> 
> #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.

-- 
John Baldwin


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]