From: Pedro Alves Date: Thu, 5 Sep 2013 11:20:16 +0000 (+0000) Subject: [PR tui/15933] TUI shows registers of the wrong frame the first time X-Git-Tag: binutils-2_24-branchpoint~92 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8eb6bda23e48b9651f7658fc6deab4712f229d55;p=platform%2Fupstream%2Fbinutils.git [PR tui/15933] TUI shows registers of the wrong frame the first time I've stumbled on this by inspection. When the TUI's register window is first displayed, it always shows the registers of the current frame, instead of of the selected frame, which is obviously bogus. E.g., (gdb) step # into "function" (gdb) up (gdb) tui reg general # or C-x 2, C-x 2 shows the registers of "function", rather than the caller's. A subsequent: (gdb) frame or (gdb) down (gdb) up can be used as workaround to "fix" it. gdb/ 2013-09-05 Pedro Alves PR tui/15933 * tui/tui-regs.c (tui_show_registers): Show registers of the selected frame, not the current frame. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 1954af5..463d9f6 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2013-09-05 Pedro Alves + + PR tui/15933 + * tui/tui-regs.c (tui_show_registers): Show registers of the + selected frame, not the current frame. + 2013-09-05 Ricard Wanderlof * MAINTAINERS (Write After Approval): Add myself to the list. diff --git a/gdb/tui/tui-regs.c b/gdb/tui/tui-regs.c index bb72340..b043a29 100644 --- a/gdb/tui/tui-regs.c +++ b/gdb/tui/tui-regs.c @@ -157,7 +157,7 @@ tui_show_registers (struct reggroup *group) if (target_has_registers && target_has_stack && target_has_memory) { - ret = tui_show_register_group (group, get_current_frame (), + ret = tui_show_register_group (group, get_selected_frame (NULL), group == display_info->current_group); } if (ret == TUI_FAILURE)