Re: How to display instructions around the current instuction?

Stefan Puiu via Gdb <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <CACKs7VAc7tYS-NR8yDnCjDr0z39_-M=QDqbS7O0Lzz-eLk9Rng@mail.gmail.com>
Hi,

On Thu, Jan 28, 2021 at 1:31 AM Peng Yu via Gdb <[email protected]> wrote:
>
> Hi,
>
> The following command will disply instructions below the current
> instructions. Is there a way to display around the current instruction
> (e.g., 5 instructions above and 5 instructions below)?
>
> display/10i $rip

Have you tried something using '$rip-10' in your command?

display/10i $rip-10

I don't think x86-64 instructions have fixed width, so that won't
always print the same number of instructions before the current one,
but it's probably a good approximation.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.