This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Add a new format letter to dump instructions backward
- From: John Baldwin <jhb at freebsd dot org>
- To: gdb-patches at sourceware dot org
- Cc: Pedro Alves <palves at redhat dot com>, Toshihito Kikuchi <k dot toshihito at yahoo dot de>
- Date: Mon, 25 Jan 2016 09:52:54 -0800
- Subject: Re: [PATCH] Add a new format letter to dump instructions backward
- Authentication-results: sourceware.org; auth=none
- References: <1827952218 dot 466587 dot 1453670934999 dot JavaMail dot yahoo dot ref at mail dot yahoo dot com> <1827952218 dot 466587 dot 1453670934999 dot JavaMail dot yahoo at mail dot yahoo dot com> <56A609E7 dot 6050903 at redhat dot com>
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