Problem debug with Gdb-7.1.2

CodeLite installation/troubleshooting forum
drr00t
CodeLite Curious
Posts: 2
Joined: Fri Apr 09, 2010 4:59 pm
Genuine User: Yes
IDE Question: C++
Contact:

Problem debug with Gdb-7.1.2

Post by drr00t »

Hi,

I trying migrate from CodeBlocks to CodeLite, but i can´t debug with CodeLite, follow detailed information.

My environment:

SO - Windows Vista x86
IDE - CodeLite 2.5.2.4031
Gcc - 4.4.3 from ftp://ftp.equation.com/gcc/gcc-4.4.3-32.exe
Debugger - http://sourceforge.net/projects/mingw/f ... z/download

Code: Select all

Using gdbinit file: d:\Temp\codelite_gdbinit.txt
Current working dir: E:\QuanticVortex\engine samples\01_Sample\builds\cl
Launching gdb from : ../../../bin/debug/
Starting debugger  : C:\MinGW\bin\gdb.exe --command="d:\Temp\codelite_gdbinit.txt" --interpreter=mi "01_Sample_d.exe"
DEBUG>>set  new-console on
DEBUG>>set unwindonsignal on
DEBUG>>catch throw
DEBUG>>set width 0
DEBUG>>set height 0
DEBUG>>set print pretty on
DEBUG>>set print elements 200
DEBUG>>00000001-break-insert "\"G:/QuanticVortex/engine samples/01_Sample/source/main.cpp:13\""
DEBUG>>00000002-break-insert "\"E:/QuanticVortex/engine samples/01_Sample/source/main.cpp:15\""
Debug session started successfully!
DEBUG>>00000003-exec-run 
DEBUG>>~"GNU gdb (GDB) 7.1\n"
GNU gdb (GDB) 7.1
DEBUG>>~"Copyright (C) 2010 Free Software Foundation, Inc.\n"
Copyright (C) 2010 Free Software Foundation, Inc.
DEBUG>>~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n"
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
DEBUG>>~"This is free software: you are free to change and redistribute it.\n"
This is free software: you are free to change and redistribute it.
DEBUG>>~"There is NO WARRANTY, to the extent permitted by law.  Type \"show copying\"\n"
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
DEBUG>>~"and \"show warranty\" for details.\n"
and "show warranty" for details.
DEBUG>>~"This GDB was configured as \"mingw32\".\n"
This GDB was configured as "mingw32".
DEBUG>>~"For bug reporting instructions, please see:\n"
For bug reporting instructions, please see:
DEBUG>>~"<http://www.gnu.org/software/gdb/bugs/>...\n"
<http://www.gnu.org/software/gdb/bugs/>...
DEBUG>>~"Reading symbols from E:\\QuanticVortex\\engine samples\\bin\\debug/01_Sample_d.exe..."
Reading symbols from E:\QuanticVortex\engine samples\bin\debug/01_Sample_d.exe...
DEBUG>>~"done.\n"
done.
DEBUG>>&"set  new-console on\n"
DEBUG>>^done
DEBUG>>&"set unwindonsignal on\n"
DEBUG>>^done
DEBUG>>&"catch throw\n"
DEBUG>>~"Catchpoint 1 (throw)\n"
Catchpoint 1 (throw)
DEBUG>>^done
DEBUG>>&"set width 0\n"
DEBUG>>^done
DEBUG>>&"set height 0\n"
DEBUG>>^done
DEBUG>>&"set print pretty on\n"
DEBUG>>^done
DEBUG>>&"set print elements 200\n"
DEBUG>>^done
DEBUG>>00000001^done,bkpt={number="2",type="breakpoint",disp="keep",enabled="y",addr="0x00402955",func="main",file="G:\\QuanticVortex\\engine samples\\01_Sample\\source\\main.cpp",line="13",times="0",original-location="\"G:/QuanticVortex/engine samples/01_Sample/source/main.cpp:13"}
Found the breakpoint ID!
Storing debugger breakpoint Id=2
Successfully set breakpoint 2 at: G:\QuanticVortex\engine samples\01_Sample\source\main.cpp:13
DEBUG>>00000002^error,msg="No source file named E:/QuanticVortex/engine samples/01_Sample/source/main.cpp."
Breakpoint creation unsuccessful
ERROR: failed to place breakpoint: "^error,msg="No source file named E:/QuanticVortex/engine samples/01_Sample/source/main.cpp.""
No source file named E:/QuanticVortex/engine samples/01_Sample/source/main.cpp.
Debuggee process ID: 4092
DEBUG>>=thread-group-created,id="4092"
=thread-group-created,id="4092"
DEBUG>>=thread-created,id="1",group-id="4092"
=thread-created,id="1",group-id="4092"
DEBUG>>~"[New Thread 4092.0x5d4]\n"
[New Thread 4092.0x5d4]
DEBUG>>00000003^running
Continuing...
DEBUG>>*running,thread-id="all"
*running,thread-id="all"
DEBUG>>=library-loaded,id="C:\\WINDOWS\\system32\\ntdll.dll",target-name="C:\\WINDOWS\\system32\\ntdll.dll",host-name="C:\\WINDOWS\\system32\\ntdll.dll",symbols-loaded="0"
=library-loaded,id="C:\\WINDOWS\\system32\\ntdll.dll",target-name="C:\\WINDOWS\\system32\\ntdll.dll",host-name="C:\\WINDOWS\\system32\\ntdll.dll",symbols-loaded="0"
DEBUG>>=library-loaded,id="C:\\WINDOWS\\system32\\kernel32.dll",target-name="C:\\WINDOWS\\system32\\kernel32.dll",host-name="C:\\WINDOWS\\system32\\kernel32.dll",symbols-loaded="0"
=library-loaded,id="C:\\WINDOWS\\system32\\kernel32.dll",target-name="C:\\WINDOWS\\system32\\kernel32.dll",host-name="C:\\WINDOWS\\system32\\kernel32.dll",symbols-loaded="0"
DEBUG>>=library-loaded,id="E:\\QuanticVortex\\engine samples\\bin\\debug\\QuanticVortex_d.dll",target-name="E:\\QuanticVortex\\engine samples\\bin\\debug\\QuanticVortex_d.dll",host-name="E:\\QuanticVortex\\engine samples\\bin\\debug\\QuanticVortex_d.dll",symbols-loaded="0"
=library-loaded,id="E:\\QuanticVortex\\engine samples\\bin\\debug\\QuanticVortex_d.dll",target-name="E:\\QuanticVortex\\engine samples\\bin\\debug\\QuanticVortex_d.dll",host-name="E:\\QuanticVortex\\engine samples\\bin\\debug\\QuanticVortex_d.dll",symbols-loaded="0"
DEBUG>>=library-loaded,id="E:\\QuanticVortex\\engine samples\\bin\\debug\\Irrlicht_d.dll",target-name="E:\\QuanticVortex\\engine samples\\bin\\debug\\Irrlicht_d.dll",host-name="E:\\QuanticVortex\\engine samples\\bin\\debug\\Irrlicht_d.dll",symbols-loaded="0"
=library-loaded,id="E:\\QuanticVortex\\engine samples\\bin\\debug\\Irrlicht_d.dll",target-name="E:\\QuanticVortex\\engine samples\\bin\\debug\\Irrlicht_d.dll",host-name="E:\\QuanticVortex\\engine samples\\bin\\debug\\Irrlicht_d.dll",symbols-loaded="0"
DEBUG>>=library-loaded,id="C:\\WINDOWS\\system32\\advapi32.dll",target-name="C:\\WINDOWS\\system32\\advapi32.dll",host-name="C:\\WINDOWS\\system32\\advapi32.dll",symbols-loaded="0"
=library-loaded,id="C:\\WINDOWS\\system32\\advapi32.dll",target-name="C:\\WINDOWS\\system32\\advapi32.dll",host-name="C:\\WINDOWS\\system32\\advapi32.dll",symbols-loaded="0"
DEBUG>>=library-loaded,id="C:\\WINDOWS\\system32\\rpcrt4.dll",target-name="C:\\WINDOWS\\system32\\rpcrt4.dll",host-name="C:\\WINDOWS\\system32\\rpcrt4.dll",symbols-loaded="0"
=library-loaded,id="C:\\WINDOWS\\system32\\rpcrt4.dll",target-name="C:\\WINDOWS\\system32\\rpcrt4.dll",host-name="C:\\WINDOWS\\system32\\rpcrt4.dll",symbols-loaded="0"
DEBUG>>=library-loaded,id="C:\\WINDOWS\\system32\\secur32.dll",target-name="C:\\WINDOWS\\system32\\secur32.dll",host-name="C:\\WINDOWS\\system32\\secur32.dll",symbols-loaded="0"
=library-loaded,id="C:\\WINDOWS\\system32\\secur32.dll",target-name="C:\\WINDOWS\\system32\\secur32.dll",host-name="C:\\WINDOWS\\system32\\secur32.dll",symbols-loaded="0"
DEBUG>>=library-loaded,id="C:\\WINDOWS\\system32\\gdi32.dll",target-name="C:\\WINDOWS\\system32\\gdi32.dll",host-name="C:\\WINDOWS\\system32\\gdi32.dll",symbols-loaded="0"
=library-loaded,id="C:\\WINDOWS\\system32\\gdi32.dll",target-name="C:\\WINDOWS\\system32\\gdi32.dll",host-name="C:\\WINDOWS\\system32\\gdi32.dll",symbols-loaded="0"
DEBUG>>=library-loaded,id="C:\\WINDOWS\\system32\\user32.dll",target-name="C:\\WINDOWS\\system32\\user32.dll",host-name="C:\\WINDOWS\\system32\\user32.dll",symbols-loaded="0"
=library-loaded,id="C:\\WINDOWS\\system32\\user32.dll",target-name="C:\\WINDOWS\\system32\\user32.dll",host-name="C:\\WINDOWS\\system32\\user32.dll",symbols-loaded="0"
DEBUG>>=library-loaded,id="C:\\WINDOWS\\system32\\msvcrt.dll",target-name="C:\\WINDOWS\\system32\\msvcrt.dll",host-name="C:\\WINDOWS\\system32\\msvcrt.dll",symbols-loaded="0"
=library-loaded,id="C:\\WINDOWS\\system32\\msvcrt.dll",target-name="C:\\WINDOWS\\system32\\msvcrt.dll",host-name="C:\\WINDOWS\\system32\\msvcrt.dll",symbols-loaded="0"
DEBUG>>=library-loaded,id="C:\\WINDOWS\\system32\\opengl32.dll",target-name="C:\\WINDOWS\\system32\\opengl32.dll",host-name="C:\\WINDOWS\\system32\\opengl32.dll",symbols-loaded="0"
=library-loaded,id="C:\\WINDOWS\\system32\\opengl32.dll",target-name="C:\\WINDOWS\\system32\\opengl32.dll",host-name="C:\\WINDOWS\\system32\\opengl32.dll",symbols-loaded="0"
DEBUG>>=library-loaded,id="C:\\WINDOWS\\system32\\glu32.dll",target-name="C:\\WINDOWS\\system32\\glu32.dll",host-name="C:\\WINDOWS\\system32\\glu32.dll",symbols-loaded="0"
=library-loaded,id="C:\\WINDOWS\\system32\\glu32.dll",target-name="C:\\WINDOWS\\system32\\glu32.dll",host-name="C:\\WINDOWS\\system32\\glu32.dll",symbols-loaded="0"
DEBUG>>=library-loaded,id="C:\\WINDOWS\\system32\\ddraw.dll",target-name="C:\\WINDOWS\\system32\\ddraw.dll",host-name="C:\\WINDOWS\\system32\\ddraw.dll",symbols-loaded="0"
=library-loaded,id="C:\\WINDOWS\\system32\\ddraw.dll",target-name="C:\\WINDOWS\\system32\\ddraw.dll",host-name="C:\\WINDOWS\\system32\\ddraw.dll",symbols-loaded="0"
DEBUG>>=library-loaded,id="C:\\WINDOWS\\system32\\dciman32.dll",target-name="C:\\WINDOWS\\system32\\dciman32.dll",host-name="C:\\WINDOWS\\system32\\dciman32.dll",symbols-loaded="0"
=library-loaded,id="C:\\WINDOWS\\system32\\dciman32.dll",target-name="C:\\WINDOWS\\system32\\dciman32.dll",host-name="C:\\WINDOWS\\system32\\dciman32.dll",symbols-loaded="0"
DEBUG>>=library-loaded,id="C:\\WINDOWS\\system32\\winmm.dll",target-name="C:\\WINDOWS\\system32\\winmm.dll",host-name="C:\\WINDOWS\\system32\\winmm.dll",symbols-loaded="0"
=library-loaded,id="C:\\WINDOWS\\system32\\winmm.dll",target-name="C:\\WINDOWS\\system32\\winmm.dll",host-name="C:\\WINDOWS\\system32\\winmm.dll",symbols-loaded="0"
DEBUG>>=library-loaded,id="C:\\WINDOWS\\system32\\imm32.dll",target-name="C:\\WINDOWS\\system32\\imm32.dll",host-name="C:\\WINDOWS\\system32\\imm32.dll",symbols-loaded="0"
=library-loaded,id="C:\\WINDOWS\\system32\\imm32.dll",target-name="C:\\WINDOWS\\system32\\imm32.dll",host-name="C:\\WINDOWS\\system32\\imm32.dll",symbols-loaded="0"
DEBUG>>*stopped,reason="breakpoint-hit",disp="keep",bkptno="2",frame={addr="0x00402955",func="main",args=[{name="argc",value="1"},{name="argv",value="0x8d6e500"}],file="G:\\QuanticVortex\\engine samples\\01_Sample\\source\\main.cpp",line="13"},thread-id="1",stopped-threads="all"
DEBUG>>00000004-file-list-exec-source-file
DEBUG>>00000005-break-list
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>>00000004^done,line="13",file="G:\\QuanticVortex\\engine samples\\01_Sample\\source\\main.cpp",macro-info="0"
DEBUG>>00000006-stack-list-locals 2
DEBUG>>00000007-stack-list-arguments 2 0 0 
DEBUG>>~"../../gdb-7.1/gdb/breakpoint.c:4146: internal-error: print_one_breakpoint_location: Assertion `b->loc == NULL || b->loc->next == NULL' failed.\nA problem internal to GDB has been detected,\nfurther debugging may prove unreliable.\nQuit this debugging session? "
../../gdb-7.1/gdb/breakpoint.c:4146: internal-error: print_one_breakpoint_location: Assertion `b->loc == NULL || b->loc->next == NULL' failed.\nA problem internal to GDB has been detected,\nfurther debugging may prove unreliable.\nQuit this debugging session?
DEBUG>>~"(y or n) [answered Y; input not from terminal]\n"
(y or n) [answered Y; input not from terminal]
DEBUG>>~"../../gdb-7.1/gdb/breakpoint.c:4146: internal-error: print_one_breakpoint_location: Assertion `b->loc == NULL || b->loc->next == NULL' failed.\nA problem internal to GDB has been detected,\nfurther debugging may prove unreliable.\nCreate a core file of GDB? "
../../gdb-7.1/gdb/breakpoint.c:4146: internal-error: print_one_breakpoint_location: Assertion `b->loc == NULL || b->loc->next == NULL' failed.\nA problem internal to GDB has been detected,\nfurther debugging may prove unreliable.\nCreate a core file of GDB?
DEBUG>>~"(y or n) [answered Y; input not from terminal]\n"
(y or n) [answered Y; input not from terminal]
Thanks for help.
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Problem debug with Gdb-7.1.2

Post by eranif »

drr00t wrote:DEBUG>>~"../../gdb-7.1/gdb/breakpoint.c:4146: internal-error: print_one_breakpoint_location: Assertion `b->loc == NULL || b->loc->next == NULL' failed.\nA problem internal to GDB has been detected,\nfurther debugging may prove unreliable.\nQuit this debugging session? "
../../gdb-7.1/gdb/breakpoint.c:4146: internal-error: print_one_breakpoint_location: Assertion `b->loc == NULL || b->loc->next == NULL' failed.\nA problem internal to GDB has been detected,\nfurther debugging may prove unreliable.\nQuit this debugging session?
DEBUG>>~"(y or n) [answered Y; input not from terminal]\n"
(y or n) [answered Y; input not from terminal]
GDB crashed for you...

I have two suggestions (which I think one of them will fix your problem)

1) Install the bundled package of codelite + mingw and use the debugger that comes with it
https://sourceforge.net/projects/codeli ... e/download

2) It is a known problem (to me and to other people around the glob ;) ) that the newer gdb crashes sometimes when trying to 'catch throw' / 'break assert'
so, disable those options from 'settings -> debugger settings' and uncheck the options 'break when C++ exception is thrown' and 'Break at assertion failure'

Eran
Make sure you have read the HOW TO POST thread
drr00t
CodeLite Curious
Posts: 2
Joined: Fri Apr 09, 2010 4:59 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Problem debug with Gdb-7.1.2

Post by drr00t »

Hi,

Thank you for help, i uncheck the options 'break when C++ exception is thrown' and works.
Post Reply