Author Topic: GDB SIGSEGV  (Read 3332 times)

Offline raytaller

  • Single posting newcomer
  • *
  • Posts: 4
GDB SIGSEGV
« on: January 04, 2008, 02:15:36 pm »
Hello,
I can't debug with :
- WinXP
- MinGW 5.1
- GDB 6.3
- C::B SVN 4767 (tried 2 olders versions too)

The program compiles and run fine, but segfaults when debugging.

The log :
Code: [Select]
Selecting target:
Debug
Adding source dir: E:\Dev\Tests\2.CB debug\
Adding source dir: E:\Dev\Tests\2.CB debug\
Adding file: bin\2.CB debug.exe
Starting debugger:
done
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
Debugger name and version: GNU gdb 6.3
Child process PID: 13636
Program received signal SIGSEGV, Segmentation fault.
In ntdll!RtlpWaitForCriticalSection () (ntdll.dll)
The program :
Code: [Select]
int main(){
int i = 0;
    cout << "Hello world!" << endl;
    return 0;
}

Does anyone have an idea ?
BTW, C::B is my favourite IDE :-)

Offline alchemist

  • Multiple posting newcomer
  • *
  • Posts: 38
    • My Blog
Re: GDB SIGSEGV
« Reply #1 on: January 04, 2008, 02:22:15 pm »
try to use a folder without spaces in its name ;)
Kind Regards,
Xavier Miller.
http://xaviermiller.be

Offline raytaller

  • Single posting newcomer
  • *
  • Posts: 4
Re: GDB SIGSEGV
« Reply #2 on: January 04, 2008, 04:25:25 pm »
Well, it doesn't change anything :
Code: [Select]
Selecting target:
Debug
Adding source dir: E:\Dev\Tests\2.CBdebug\
Adding source dir: E:\Dev\Tests\2.CBdebug\
Adding file: bin\2.exe
Starting debugger:
done
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
Debugger name and version: GNU gdb 6.3
Child process PID: 14764
Program received signal SIGSEGV, Segmentation fault.
In ntdll!RtlpWaitForCriticalSection () (ntdll.dll)

Offline alchemist

  • Multiple posting newcomer
  • *
  • Posts: 38
    • My Blog
Re: GDB SIGSEGV
« Reply #3 on: January 04, 2008, 05:01:30 pm »
I see "adding bin\2.exe" : is it correct ?
Kind Regards,
Xavier Miller.
http://xaviermiller.be

Offline raytaller

  • Single posting newcomer
  • *
  • Posts: 4
Re: GDB SIGSEGV
« Reply #4 on: January 04, 2008, 06:19:08 pm »
Yes it is, and I tried with other names (here, coco and coucou)
Code: [Select]
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
<FileVersion major="1" minor="6" />
<Project>
<Option title="2.CB debug" />
<Option pch_mode="2" />
<Option compiler="gcc" />
<Build>
<Target title="Debug">
<Option output="bin\coco" prefix_auto="1" extension_auto="1" />
<Option object_output="obj\Debug\" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-g" />
</Compiler>
</Target>
<Target title="Release">
<Option output="bin\coucou" prefix_auto="1" extension_auto="1" />
<Option object_output="obj\Release\" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-O2" />
</Compiler>
<Linker>
<Add option="-s" />
</Linker>
</Target>
</Build>
<Compiler>
<Add option="-Wall" />
<Add option="-fexceptions" />
</Compiler>
<Unit filename="main.cpp" />
<Extensions>
<code_completion />
<envvars />
<debugger />
<lib_finder />
</Extensions>
</Project>
</CodeBlocks_project_file>
Any idea ?
Thanks for helping
« Last Edit: January 07, 2008, 04:37:08 pm by raytaller »

Offline raytaller

  • Single posting newcomer
  • *
  • Posts: 4
Re: GDB SIGSEGV
« Reply #5 on: January 11, 2008, 12:13:27 am »
 :) ?