aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/lib
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2020-01-07 00:41:08 +0000
committerAndrew Burgess <andrew.burgess@embecosm.com>2020-01-09 23:11:45 +0000
commitb2efe70cf34e2f3ada8d0def69e53f27a6b71578 (patch)
treed678a733515b2c48cb302c3d83d4abd6bb05d65f /gdb/testsuite/lib
parent3804da7e07a13c14210d79de55ebfe2318421164 (diff)
downloadgdb-b2efe70cf34e2f3ada8d0def69e53f27a6b71578.zip
gdb-b2efe70cf34e2f3ada8d0def69e53f27a6b71578.tar.gz
gdb-b2efe70cf34e2f3ada8d0def69e53f27a6b71578.tar.bz2
gdb/tui: Fix 'layout asm' before the inferior has started
Currently if a user starts the tui with 'layout asm' then they will be presented with the 'src' layout. What happens is: 1. Layout command enables TUI, selecting the SRC layout by default. 2. As part of tui_enable we call tui_display_main, which calls tui_get_begin_asm_address, which calls set_default_source_symtab_and_line. This changes core GDBs current symtab and line, which triggers a call to the symtab changed hook tui_symtab_changed, which sets the flag from_source_symtab. 3. Back in the layout command, the layout is changed from SRC to ASM. After this the layout command completes and we return to core GDB which prints the prompt, however... 4. The before prompt hook is called which sees the from_source_symtab flag is set and forces the SRC window to be displayed. This switches us back to SRC view. The solution I propose here is to delay installing the hooks into core GDB until after we have finished setting up the tui and selecting the default frame to view. In this way we effectively ignore the first symtab changed event triggered when making main the default symtab. gdb/ChangeLog: * tui/tui.c (tui_enable): Register tui hooks after calling tui_display_main. gdb/testsuite/ChangeLog: * gdb.tui/tui-layout-asm.exp: New file. Change-Id: I858ab81a17ffb4aa72deb3f36c3755228a9c9d9a
Diffstat (limited to 'gdb/testsuite/lib')
0 files changed, 0 insertions, 0 deletions