From: Hui Zhu Date: Sun, 27 Apr 2014 14:23:43 +0000 (+0800) Subject: Make "set disassemble-next-line on" can work with DUMMY_FRAME, SIGTRAMP_FRAME and... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=433e77fad1fda55408db072de18dcd4f9116289e;p=binutils-gdb.git Make "set disassemble-next-line on" can work with DUMMY_FRAME, SIGTRAMP_FRAME and ARCH_FRAME When GDB debug DUMMY_FRAME, SIGTRAMP_FRAME and ARCH_FRAME, even if "set disassemble-next-line on", it will not output the asm code: (gdb) set disassemble-next-line on (gdb) si (gdb) (gdb) So make this patch make they can work together, it will become: (gdb) si => 0xffffffff816bfb09 : 65 48 8b 0c 25 c8 c7 00 00 mov %gs:0xc7c8,%rcx (gdb) => 0xffffffff816bfb12 : 48 81 e9 d8 1f 00 00 sub $0x1fd8,%rcx (gdb) => 0xffffffff816bfb19 : 8b 51 10 mov 0x10(%rcx),%edx 2014-04-27 Hui Zhu * stack.c (print_frame_info): Call do_gdb_disassembly with DUMMY_FRAME, SIGTRAMP_FRAME and ARCH_FRAME. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index b333606f4b8..e1093cf36b5 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2014-04-27 Hui Zhu + + * stack.c (print_frame_info): Call do_gdb_disassembly with + DUMMY_FRAME, SIGTRAMP_FRAME and ARCH_FRAME. + 2014-04-26 Doug Evans * guile/scm-safe-call.c (scscm_eval_scheme_string): Fix comment. diff --git a/gdb/stack.c b/gdb/stack.c index da7d9775101..6f08aaec07d 100644 --- a/gdb/stack.c +++ b/gdb/stack.c @@ -836,6 +836,13 @@ print_frame_info (struct frame_info *frame, int print_level, ui_out_text (uiout, "\n"); annotate_frame_end (); + /* If disassemble-next-line is set to auto or on output the next + instruction. */ + if (disassemble_next_line == AUTO_BOOLEAN_AUTO + || disassemble_next_line == AUTO_BOOLEAN_TRUE) + do_gdb_disassembly (get_frame_arch (frame), 1, + get_frame_pc (frame), get_frame_pc (frame) + 1); + do_cleanups (uiout_cleanup); return; }