msys mingw GDB seems to not be working with Codelite 9.2.6

CodeLite installation/troubleshooting forum
genusis
CodeLite Curious
Posts: 4
Joined: Tue Feb 02, 2016 2:52 am
Genuine User: Yes
IDE Question: C++
Contact:

msys mingw GDB seems to not be working with Codelite 9.2.6

Post by genusis »

Codelite version: 9.2.6
Self compiled?: NO
OS: Windows 10
Compiler version: msys2 mingw32 gcc 6.2.0 rev 2

Code: Select all

Using gdbinit file: C:\Users\genusis\AppData\Local\Temp\codelite_gdbinit.txt
Current working dir: C:\msys64\home\genusis\ui-parser
Launching gdb from : ./build32
Starting debugger  : C:/msys64/mingw32/bin/gdb.exe --command="C:\Users\genusis\AppData\Local\Temp\codelite_gdbinit.txt" --interpreter=mi "./ui-parser.exe"
DEBUG>>set  new-console on
DEBUG>>set unwindonsignal on
DEBUG>>set breakpoint pending on
DEBUG>>set print object on
DEBUG>>set width 0
DEBUG>>set height 0
DEBUG>>set print elements 200
DEBUG>>python
DEBUG>>import sys
DEBUG>>sys.path.insert(0, 'C:\Users\genusis\AppData\Roaming\codelite\gdb_printers')
DEBUG>>from libstdcxx.v6.printers import register_libstdcxx_printers
DEBUG>>register_libstdcxx_printers (None)
DEBUG>>from qt4 import register_qt4_printers
DEBUG>>register_qt4_printers (None)
DEBUG>>from wx import register_wx_printers
DEBUG>>register_wx_printers (None)
DEBUG>>end
DEBUG>>00000028-break-insert -f -t main
DEBUG>>00000029-enable-pretty-printing
Debug session started successfully!
DEBUG>>00000030-exec-arguments 
DEBUG>>00000031-exec-run 
DEBUG>>=thread-group-added,id="i1"
=thread-group-added,id="i1"
DEBUG>>~"GNU gdb (GDB) 7.12\n"
GNU gdb (GDB) 7.12
DEBUG>>~"Copyright (C) 2016 Free Software Foundation, Inc.\n"
Copyright (C) 2016 Free Software Foundation, Inc.
DEBUG>>~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.  Type \"show copying\"\nand \"show warranty\" for details.\n"
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.  Type "show copying"\nand "show warranty" for details.
DEBUG>>~"This GDB was configured as \"i686-w64-mingw32\".\nType \"show configuration\" for configuration details."
This GDB was configured as "i686-w64-mingw32".\nType "show configuration" for configuration details.
DEBUG>>~"\nFor bug reporting instructions, please see:\n"
\nFor bug reporting instructions, please see:
DEBUG>>~"<http://www.gnu.org/software/gdb/bugs/>.\n"
<http://www.gnu.org/software/gdb/bugs/>.
DEBUG>>~"Find the GDB manual and other documentation resources online at:\n<http://www.gnu.org/software/gdb/documentation/>.\n"
Find the GDB manual and other documentation resources online at:\n<http://www.gnu.org/software/gdb/documentation/>.
DEBUG>>~"For help, type \"help\".\n"
For help, type "help".
DEBUG>>~"Type \"apropos word\" to search for commands related to \"word\"...\n"
Type "apropos word" to search for commands related to "word"...
DEBUG>>~"Reading symbols from ./ui-parser.exe..."
Reading symbols from ./ui-parser.exe...
DEBUG>>~"done.\n"
done.
DEBUG>>&"set  new-console on\n"
DEBUG>>=cmd-param-changed,param="new-console",value="on"
=cmd-param-changed,param="new-console",value="on"
DEBUG>>^done
DEBUG>>&"set unwindonsignal on\n"
DEBUG>>=cmd-param-changed,param="unwindonsignal",value="on"
=cmd-param-changed,param="unwindonsignal",value="on"
DEBUG>>^done
DEBUG>>&"set breakpoint pending on\n"
DEBUG>>=cmd-param-changed,param="breakpoint pending",value="on"
=cmd-param-changed,param="breakpoint pending",value="on"
DEBUG>>^done
DEBUG>>&"set print object on\n"
DEBUG>>=cmd-param-changed,param="print object",value="on"
=cmd-param-changed,param="print object",value="on"
DEBUG>>^done
DEBUG>>&"set width 0\n"
DEBUG>>=cmd-param-changed,param="width",value="4294967295"
=cmd-param-changed,param="width",value="4294967295"
DEBUG>>^done
DEBUG>>&"set height 0\n"
DEBUG>>^done
DEBUG>>&"set print elements 200\n"
DEBUG>>^done
DEBUG>>&"python\n"
DEBUG>>&"Traceback (most recent call last):\n"
DEBUG>>&"  File \"<string>\", line 4, in <module>\n"
DEBUG>>&"  File \"c:\\msys64\\mingw32\\share\\gdb/python/../../gcc-6.2.0/python/libstdcxx/v6/printers.py\", line 1334, in register_libstdcxx_printers\n"
DEBUG>>This application has requested the Runtime to terminate it in an unusual way.
This application has requested the Runtime to terminate it in an unusual way.
DEBUG>>Please contact the application's support team for more information.
Please contact the application's support team for more information.
DEBUG>>&"    gdb.printing.register_pretty_printer(obj, libstdcxx_printer)\n"
DEBUG>>&"  File \"c:\\msys64\\mingw32\\share\\gdb/python/gdb/printing.py\", line 152, in register_pretty_printer\n"
DEBUG>>&"    printer.name)\n"
DEBUG>>&"RuntimeError: pretty-printer already registered: libstdc++-v6\n"
GDB Version 7.12

msys2 mingw32 gcc works just fine in codelite but i get the above with GDB. GBD works fine in msys32 and i can open and call GDB within cmd to get its version. This error has not happened before when using codelite 9.2.0 thru 9.2.4
I have not yet tested it with 9.2.5 and only with 9.2.6 just today.

Just tested the msys2 mingw64 gdb and that one worked just fine. just the 32bit one is not working.....
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: msys mingw GDB seems to not be working with Codelite 9.2

Post by eranif »

We can clearly see that gdb started successfully, it crashed during running some python code (probably the pretty printers)
This looks like a bug in gdb, you should report this on the GBD mailing list.

You can try and disable the python commands from CodeLite and start GDB again:
settings->gdb settings->startup commands

and clear that page

Eran
Make sure you have read the HOW TO POST thread
genusis
CodeLite Curious
Posts: 4
Joined: Tue Feb 02, 2016 2:52 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: msys mingw GDB seems to not be working with Codelite 9.2

Post by genusis »

Ahh thank you. Removing them did indeed fix the problem. but by removing would that cause anything else not to work correctly?
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: msys mingw GDB seems to not be working with Codelite 9.2

Post by eranif »

It's simply is GDB crashing, in more particular, its python built-in interpreter crashed
Make sure you have read the HOW TO POST thread
Post Reply