public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/18155] New: gdb TUI SEGVs when resizing asm window
@ 2015-03-23 19:56 anton at samba dot org
  2015-04-28  1:25 ` [Bug gdb/18155] " cvs-commit at gcc dot gnu.org
  2015-07-02 13:03 ` palves at redhat dot com
  0 siblings, 2 replies; 3+ messages in thread
From: anton at samba dot org @ 2015-03-23 19:56 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=18155

            Bug ID: 18155
           Summary: gdb TUI SEGVs when resizing asm window
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: anton at samba dot org

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

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug gdb/18155] gdb TUI SEGVs when resizing asm window
  2015-03-23 19:56 [Bug gdb/18155] New: gdb TUI SEGVs when resizing asm window anton at samba dot org
@ 2015-04-28  1:25 ` cvs-commit at gcc dot gnu.org
  2015-07-02 13:03 ` palves at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2015-04-28  1:25 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=18155

--- Comment #1 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug gdb/18155] gdb TUI SEGVs when resizing asm window
  2015-03-23 19:56 [Bug gdb/18155] New: gdb TUI SEGVs when resizing asm window anton at samba dot org
  2015-04-28  1:25 ` [Bug gdb/18155] " cvs-commit at gcc dot gnu.org
@ 2015-07-02 13:03 ` palves at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: palves at redhat dot com @ 2015-07-02 13:03 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=18155

Pedro Alves <palves at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |palves at redhat dot com
         Resolution|---                         |FIXED

--- Comment #2 from Pedro Alves <palves at redhat dot com> ---
Should be fixed now.  Closing.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-07-02 13:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-23 19:56 [Bug gdb/18155] New: gdb TUI SEGVs when resizing asm window anton at samba dot org
2015-04-28  1:25 ` [Bug gdb/18155] " cvs-commit at gcc dot gnu.org
2015-07-02 13:03 ` palves at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).