Re: How to display instructions around the current instuction?

Peng Yu via Gdb <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <CABrM6wnOA15=Ost+ScWxc53V6215jo7RX7SdprR+tnMZRKHn0w@mail.gmail.com>
Hi Christo,

> Another possibility could be: set disassemble-next-line on

This does not correctly answer the question. It just show the current
line but not the context.

Also, how to just show the disassembled code but the hex numbers.

I know the doc is here. But is there is a way to check its helpage
withing gdb command line? Thanks.

https://visualgdb.com/gdbreference/commands/set_disassemble-next-line

Temporary breakpoint 1, 0x0000000000401134 in main ()
=> 0x0000000000401134 <main+4>:	48 83 ec 10	sub    rsp,0x10
(gdb) 0x0000000000401138 in main ()
=> 0x0000000000401138 <main+8>:	c7 45 fc 00 00 00 00	mov    DWORD PTR
[rbp-0x4],0x0
(gdb) 0x000000000040113f in main ()
=> 0x000000000040113f <main+15>:	48 bf 04 20 40 00 00 00 00 00	movabs
rdi,0x402004

-- 
Regards,
Peng
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.