This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[mingw cvs head]gdb.exe crash on quit


I just build cvs head under msys+mingw. The gdb is python enabled.
I just type the command below, after type "q", gdb crashes.
I try to run gdb under another gdb, and catch the backtrace, see below

E:\code\gcc\PCXMinGW463\bin>gdb75 gdbcvs
GNU gdb (GDB) 7.5
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 "i686-pc-mingw32".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from E:\code\gcc\PCXMinGW463\bin\gdbcvs.exe...done.
(gdb) r
Starting program: E:\code\gcc\PCXMinGW463\bin\gdbcvs.exe
[New Thread 3744.0x1f8]
GNU gdb (GDB) 7.5.50.20120914-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 "mingw32".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
(gdb) [New Thread 3744.0x3f4]
[New Thread 3744.0xc5c]
q

Program received signal SIGSEGV, Segmentation fault.
0x1e032e89 in python27!PyErr_Occurred ()
   from E:\code\gcc\PCXMinGW463\bin\python27.dll
(gdb) bt
#0  0x1e032e89 in python27!PyErr_Occurred ()
   from E:\code\gcc\PCXMinGW463\bin\python27.dll
#1  0x0045319e in restore_python_env (p=0x2f89638)
    at ../../gdb/gdb/python/python.c:118
#2  0x004a047d in do_my_cleanups (pmy_chain=0x6d307c, old_chain=0x716e38)
    at ../../gdb/gdb/cleanups.c:155
#3  0x004a047d in do_my_cleanups (pmy_chain=0x6d3080, old_chain=0x716e38)
    at ../../gdb/gdb/cleanups.c:155
#4  0x005a8a3a in quit_target (arg=0x2a4fb98) at ../../gdb/gdb/top.c:1309
#5  0x004f569b in catch_errors (func=0x5a89f0 <quit_target>,
    func_args=0x2a4fb98, errstring=0x7628cc "Quitting: ", mask=6)
    at ../../gdb/gdb/exceptions.c:546
#6  0x005a954f in quit_force (args=0x0, from_tty=1)
    at ../../gdb/gdb/top.c:1337
#7  0x005a8fe5 in execute_command (p=0x294731 "", from_tty=1)
    at ../../gdb/gdb/top.c:491
#8  0x004fc956 in command_handler (command=0x294730 "q")
    at ../../gdb/gdb/event-top.c:429
#9  0x004fd103 in command_line_handler (rl=0x2f81e18 "")
    at ../../gdb/gdb/event-top.c:630
#10 0x005d9f41 in rl_callback_read_char ()
    at ../../gdb/readline/callback.c:220
#11 0x004fc9c8 in rl_callback_read_char_wrapper (client_data=0x0)
    at ../../gdb/gdb/event-top.c:163
#12 0x004fbcc4 in handle_file_event (data=...)
    at ../../gdb/gdb/event-loop.c:827
#13 0x004fbc53 in process_event () at ../../gdb/gdb/event-loop.c:401
#14 process_event () at ../../gdb/gdb/event-loop.c:351
#15 0x004fbfd5 in gdb_do_one_event () at ../../gdb/gdb/event-loop.c:465
#16 0x004fc12c in start_event_loop () at ../../gdb/gdb/event-loop.c:490
#17 0x004f6932 in captured_command_loop (data=0x0) at ../../gdb/gdb/main.c:226
#18 0x004f569b in catch_errors (func=0x4f6920 <captured_command_loop>,
    func_args=0x0, errstring=0x7305cd "", mask=6)
    at ../../gdb/gdb/exceptions.c:546
#19 0x004f7424 in captured_main (data=0x2a4fee0) at ../../gdb/gdb/main.c:999
#20 0x004f569b in catch_errors (func=0x4f6ae0 <captured_main>,
    func_args=0x2a4fee0, errstring=0x7305cd "", mask=6)
    at ../../gdb/gdb/exceptions.c:546
#21 0x004f79f0 in gdb_main (args=0x2a4fee0) at ../../gdb/gdb/main.c:1008
#22 0x006cac98 in main (argc=1, argv=0x292f18) at ../../gdb/gdb/gdb.c:34
(gdb)

Hope its useful to help to find the crash.

BTW: the gdb I build 2012-09-07 has no such issue.
I mostly suspect the change of gdb python module code
* Refactor Python "gdb" module into a proper Python package, by introducing
a new "_gdb" module for code implemented in C, and using reload/__import__
instead of exec.
cause this issue.

Yuanhui Zhang


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]