To reproduce: gdb /bin/bash layout asm [ resize the window ] #0 tui_set_disassem_content (gdbarch=gdbarch@entry=0x1c99780, pc=4320912) at ../../binutils-gdb/gdb/tui/tui-disasm.c:195 #1 0x00000000004fbfab in tui_update_source_window_as_is (win_info=win_info@entry=0x1d32f00, gdbarch=gdbarch@entry=0x1c99780, s=s@entry=0x0, line_or_addr=..., noerror=noerror@entry=1) at ../../binutils-gdb/gdb/tui/tui-winsource.c:98 #2 0x00000000004fc05c in tui_update_source_window (win_info=win_info@entry=0x1d32f00, gdbarch=gdbarch@entry=0x1c99780, s=s@entry=0x0, line_or_addr=..., noerror=noerror@entry=1) at ../../binutils-gdb/gdb/tui/tui-winsource.c:78 #3 0x00000000004f9063 in make_visible_with_new_height (win_info=win_info@entry=0x1d32f00) at ../../binutils-gdb/gdb/tui/tui-win.c:1447 #4 0x00000000004fac7d in tui_resize_all () at ../../binutils-gdb/gdb/tui/tui-win.c:742 #5 0x00000000004fad69 in tui_async_resize_screen (arg=<optimised out>) at ../../binutils-gdb/gdb/tui/tui-win.c:858 #6 0x00000000005c4d6c in invoke_async_signal_handlers () at ../../binutils-gdb/gdb/event-loop.c:878 #7 gdb_do_one_event () at ../../binutils-gdb/gdb/event-loop.c:266 #8 0x00000000005c4f1e in start_event_loop () at ../../binutils-gdb/gdb/event-loop.c:333 #9 0x00000000005be8e3 in captured_command_loop (data=data@entry=0x0) at ../../binutils-gdb/gdb/main.c:321 #10 0x00000000005bb97d in catch_errors (func=func@entry=0x5be8d0 <captured_command_loop>, func_args=func_args@entry=0x0, errstring=errstring@entry=0x7acf59 "", mask=mask@entry=RETURN_MASK_ALL) at ../../binutils-gdb/gdb/exceptions.c:240 #11 0x00000000005bf976 in captured_main (data=data@entry=0x7fff97c76c50) at ../../binutils-gdb/gdb/main.c:1156 #12 0x00000000005bb97d in catch_errors (func=func@entry=0x5beed0 <captured_main>, func_args=func_args@entry=0x7fff97c76c50, errstring=errstring@entry=0x7acf59 "", mask=mask@entry=RETURN_MASK_ALL) at ../../binutils-gdb/gdb/exceptions.c:240 #13 0x00000000005bfe0b in gdb_main (args=args@entry=0x7fff97c76c50) at ../../binutils-gdb/gdb/main.c:1164 #14 0x0000000000461a05 in main (argc=<optimised out>, argv=<optimised out>) at ../../binutils-gdb/gdb/gdb.c:32
The master branch has been updated by Patrick Palka <ppalka@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=9720679936fc4f710d718f13d903c7826e048a36 commit 9720679936fc4f710d718f13d903c7826e048a36 Author: Patrick Palka <patrick@parcs.ath.cx> Date: Sat Apr 25 21:59:02 2015 -0400 Fix PR gdb/18155 For no good reason the function tui_free_window() is freeing the locator window when we pass it an SRC_WIN or a DISASSEM_WIN. This behavior doesn't make much sense because the locator window is always visible and its contents do not change when the main window changes. This behavior triggers the above PR because when we switch from one TUI window to another (in the PR, from the src window to the asm window) we call tui_free_window() on the previously active window (in the PR, the src window). The function then frees the src window along with the locator window and later we segfault when the now-active asm window tries to query the locator window about the inferior's PC. This patch fixes this apparently wrong behavior by changing tui_free_window() to not free the locator window when we pass it an SRC_WIN or a DISASSEM_WIN. gdb/ChangeLog: PR gdb/18155 * tui/tui-data.c (tui_free_window): Don't free the locator window when passed an SRC_WIN or a DISASSEM_WIN.
Should be fixed now. Closing.