Hi all, With the attached patch, I'd like to add a new format letter "j" to the "x" command to dump instructions in backward direction. This feature is basically equal to "ub" command in Windows debugger. Below is the sample output: (gdb) disas main Dump of assembler code for function main(int, char**): 0x4040a7 <+0>: push %rbp 0x4040a8 <+1>: mov %rsp,%rbp 0x4040ab <+4>: sub $0x10,%rsp 0x4040af <+8>: mov %edi,-0x4(%rbp) 0x4040b2 <+11>: mov %rsi,-0x10(%rbp) => 0x4040b6 <+15>: lea 0x116(%rip),%rdi # 0x4041d3 0x4040bd <+22>: callq 0x400e30 0x4040c2 <+27>: mov $0x0,%eax 0x4040c7 <+32>: leaveq 0x4040c8 <+33>: retq End of assembler dump. (gdb) x/6j $rip 0x4040a6 : retq 0x4040a7 : push %rbp 0x4040a8 : mov %rsp,%rbp 0x4040ab : sub $0x10,%rsp 0x4040af : mov %edi,-0x4(%rbp) 0x4040b2 : mov %rsi,-0x10(%rbp) (gdb) x/2j 0x4040a2 : add %rdx,%rax 0x4040a5 : leaveq Unlike forward disassemble, theoretically it's impossible to solve a correct frame only using the code. In the example below, we cannot decide whether the instruction before "pop" is "nop" or "mov". 0x4045bb <+89>: eb b4 jmp 0x404571 0x4045bd <+91>: 90 nop 0x4045be <+92>: 5d pop %rbp 0x4045bf <+93>: c3 retq 0x4045bc <+90>: b4 90 mov $0x90,%ah 0x4045be <+92>: 5d pop %rbp 0x4045bf <+93>: c3 retq To solve this, the change takes the help of line number information. I introduced a new function "disassemble_backward" which goes backward by referring the start address of each line.If we go out of the symbol range, we cancel backtrack and dump the smallest address with the message. Tested on x86_64 GNU/Linux. Thanks, Toshihito