public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug tui/14486] New: resize crashes tui
@ 2012-08-17 20:08 hjl.tools at gmail dot com
  2012-08-17 20:16 ` [Bug tui/14486] " hjl.tools at gmail dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: hjl.tools at gmail dot com @ 2012-08-17 20:08 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=14486

             Bug #: 14486
           Summary: resize crashes tui
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: tui
        AssignedTo: unassigned@sourceware.org
        ReportedBy: hjl.tools@gmail.com
    Classification: Unclassified


[hjl@gnu-6 gdb]$ gdb gdb
GNU gdb (GDB) 7.4.50.20120707-cvs
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /export/build/gnu/gdb/build-x86_64-linux/gdb/gdb...done.
Setting up the environment for debugging gdb.
Breakpoint 1 at 0x6c430e: file /export/gnu/import/git/gdb/gdb/utils.c, line
897.
Breakpoint 2 at 0x4d621c: file /export/gnu/import/git/gdb/gdb/cli/cli-cmds.c,
line 223.
(top-gdb) b main
Breakpoint 3 at 0x456f5b: file /export/gnu/import/git/gdb/gdb/gdb.c, line 29.
(top-gdb) r
Starting program: /export/build/gnu/gdb/build-x86_64-linux/gdb/gdb 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Breakpoint 3, 
During symbol reading, incomplete CFI data; unspecified registers (e.g., rax)
at 0x456f9b.
main (argc=1, argv=0x7fffffffdee8) at /export/gnu/import/git/gdb/gdb/gdb.c:29
29      memset (&args, 0, sizeof args);
(top-gdb) layout asm

Resize window

(top-gdb) si

tui crashed:

(top-gdb) bt
#0  0x00000000004efb22 in tui_source_is_displayed (fname=0x593ce10 "bug4.js")
    at /export/gnu/import/git/gdb/gdb/tui/tui-source.c:337
#1  0x00000000004f0538 in tui_show_frame_info (fi=0xd1d800)
    at /export/gnu/import/git/gdb/gdb/tui/tui-stack.c:351
#2  0x00000000004eb1bd in tui_selected_frame_level_changed_hook (level=0)
    at /export/gnu/import/git/gdb/gdb/tui/tui-hooks.c:226
#3  0x00000000006cd470 in select_frame (fi=0xd1d800)
    at /export/gnu/import/git/gdb/gdb/frame.c:1419
#4  0x00000000005c9850 in restore_selected_frame (a_frame_id=...,
frame_level=0)
    at /export/gnu/import/git/gdb/gdb/thread.c:1038
#5  0x00000000005c9aa3 in do_restore_current_thread_cleanup (arg=0x57d82f0)
    at /export/gnu/import/git/gdb/gdb/thread.c:1106
#6  0x000000000055c3c0 in do_my_cleanups (pmy_chain=0xc11c50 <cleanup_chain>, 
    old_chain=0x42ca0f0) at /export/gnu/import/git/gdb/gdb/cleanups.c:155
#7  0x000000000055c42d in do_cleanups (old_chain=0x42ca0f0)
    at /export/gnu/import/git/gdb/gdb/cleanups.c:177
#8  0x000000000053ecd9 in insert_breakpoint_locations ()
    at /export/gnu/import/git/gdb/gdb/breakpoint.c:2891
#9  0x000000000053e7c0 in insert_breakpoints ()
    at /export/gnu/import/git/gdb/gdb/breakpoint.c:2716
#10 0x00000000005b48f4 in proceed (addr=18446744073709551615, 
    siggnal=GDB_SIGNAL_DEFAULT, step=1)
    at /export/gnu/import/git/gdb/gdb/infrun.c:2205

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug tui/14486] resize crashes tui
  2012-08-17 20:08 [Bug tui/14486] New: resize crashes tui hjl.tools at gmail dot com
@ 2012-08-17 20:16 ` hjl.tools at gmail dot com
  2012-08-27 17:01 ` cvs-commit at gcc dot gnu.org
  2012-08-27 17:44 ` hjl.tools at gmail dot com
  2 siblings, 0 replies; 4+ messages in thread
From: hjl.tools at gmail dot com @ 2012-08-17 20:16 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=14486

--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> 2012-08-17 20:16:01 UTC ---
This patch

diff --git a/gdb/tui/tui-source.c b/gdb/tui/tui-source.c
index 9ba9b1d..2027ac4 100644
--- a/gdb/tui/tui-source.c
+++ b/gdb/tui/tui-source.c
@@ -334,7 +334,8 @@ tui_show_symtab_source (struct gdbarch *gdbarch, struct
symtab *s,
 int
 tui_source_is_displayed (char *fname)
 {
-  return (TUI_SRC_WIN->generic.content_in_use 
+  return (TUI_SRC_WIN
+      && TUI_SRC_WIN->generic.content_in_use 
       && (filename_cmp (((struct tui_win_element *)
                  (tui_locator_win_info_ptr ())->
                  content[0])->which_element.locator.file_name,

works for me.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug tui/14486] resize crashes tui
  2012-08-17 20:08 [Bug tui/14486] New: resize crashes tui hjl.tools at gmail dot com
  2012-08-17 20:16 ` [Bug tui/14486] " hjl.tools at gmail dot com
@ 2012-08-27 17:01 ` cvs-commit at gcc dot gnu.org
  2012-08-27 17:44 ` hjl.tools at gmail dot com
  2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2012-08-27 17:01 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=14486

--- Comment #2 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> 2012-08-27 17:01:00 UTC ---
CVSROOT:    /cvs/src
Module name:    src
Changes by:    hjl@sourceware.org    2012-08-27 17:00:42

Modified files:
    gdb            : ChangeLog 
    gdb/tui        : tui-source.c 

Log message:
    Check if TUI_SRC_WIN is not NULL before referencing it

    PR tui/14486
    * tui/tui-source.c (tui_source_is_displayed): Check if TUI_SRC_WIN
    is not NULL before referencing it.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.14636&r2=1.14637
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/tui/tui-source.c.diff?cvsroot=src&r1=1.30&r2=1.31

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug tui/14486] resize crashes tui
  2012-08-17 20:08 [Bug tui/14486] New: resize crashes tui hjl.tools at gmail dot com
  2012-08-17 20:16 ` [Bug tui/14486] " hjl.tools at gmail dot com
  2012-08-27 17:01 ` cvs-commit at gcc dot gnu.org
@ 2012-08-27 17:44 ` hjl.tools at gmail dot com
  2 siblings, 0 replies; 4+ messages in thread
From: hjl.tools at gmail dot com @ 2012-08-27 17:44 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=14486

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |7.6

--- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> 2012-08-27 17:44:14 UTC ---
Fixed.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

end of thread, other threads:[~2012-08-27 17:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-17 20:08 [Bug tui/14486] New: resize crashes tui hjl.tools at gmail dot com
2012-08-17 20:16 ` [Bug tui/14486] " hjl.tools at gmail dot com
2012-08-27 17:01 ` cvs-commit at gcc dot gnu.org
2012-08-27 17:44 ` hjl.tools at gmail 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).