Author Topic: gcc debugger can not run  (Read 977 times)

Offline codelighter

  • Multiple posting newcomer
  • *
  • Posts: 19
gcc debugger can not run
« on: October 02, 2019, 03:03:22 pm »
I recently install the newest Mingw_w64 named x86_64-8.1.0-win32-sjlj-rt_v6-rev0 on my X64 Windows 10 OS, when I debug my C++ program, Code::Blocks throws me an error as below:
libgcc_s_seh-1.dll not found
the mingw thread model I select before install is win32,and excetpition model is sjlj not seh.

Anyone could help me out ? what's the right way to get things work? A detail introduction to seh,sjlj,posix,win32 options with Mingw_w64 would be appreciated. Thanks!

Offline codelighter

  • Multiple posting newcomer
  • *
  • Posts: 19
Re: gcc debugger can not run
« Reply #1 on: October 02, 2019, 03:38:28 pm »
I have installed another version mingw_w64 x86_64-8.1.0-posix-seh-rt_v6-rev0, and this one make things work.
Now I want to know if mingw_w64 with SEH is the only support version for Code::Blocks? Anyone knows about it?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6667
    • My Best Post
Re: gcc debugger can not run
« Reply #2 on: October 02, 2019, 09:57:50 pm »
SEH, SJLJ, DWARF2 are most of the exception choices.

seh is the standard for Windows 64 bit. And, is not valid for 32 bit.
SJLJ is the most used of the standards for Windows 32 bit.

posix and win32 are threading choices.

Tim S.
« Last Edit: October 02, 2019, 10:04:56 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline codelighter

  • Multiple posting newcomer
  • *
  • Posts: 19
Re: gcc debugger can not run
« Reply #3 on: October 03, 2019, 03:12:36 am »
Thanks very much! I have already tried  three different Mingw_W64 packages on my Win64 computer, and find out that only x86_64-8.1.0-win32-sjlj-rt_v6-rev0 can't debug normally.

Offline codelighter

  • Multiple posting newcomer
  • *
  • Posts: 19
Re: gcc debugger can not run
« Reply #4 on: October 03, 2019, 03:53:22 am »
Now I encounter another tricky problem with GDB debugger on my Win64 system.
The Debugger can not terminate normally. After I press the Stop Debugger Button, the debug output window will output similar lines like
Trying to interrupt process with pid: 5368; child pid: 5368 gdb pid: 13964, but the debugger is still in running, even if one minute later,
the Stop Debugger button is still in RED! Please refer to the attachment, you would find out the bizarre behaviour.

This is not the first time I encounter this phenomenon, actually I reinstall the Code::Blocks 17.12 for many times, the problem still exists.
It's very clumbsy to terminate the GDB debugger in the Task Manager Window or rebuild the project and only at this moment,
the Code::Blocks will force to  stop the GDB debugger.

I begin to doubt about if C::B doesn't support to work normally with GDB debugger on Win64, and CDB may be a better choice on my computer.

Anyone can explain the phenomenon?
« Last Edit: October 03, 2019, 04:01:58 am by codelighter »

Offline codelighter

  • Multiple posting newcomer
  • *
  • Posts: 19
Re: gcc debugger can not run
« Reply #5 on: October 03, 2019, 04:11:18 am »
After read the Wiki http://wiki.codeblocks.org/index.php/Installing_a_supported_compiler, I think the version of GDB may be the answer.
But I'm not very sure which version of GDB would be the right opt. The above official wiki is not updated since  2017.
It's very hard for me to decide now.  :-\

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 2553
Re: gcc debugger can not run
« Reply #6 on: October 03, 2019, 11:44:16 am »
Use the gdb shipped with the compiler... simply as that...

Offline codelighter

  • Multiple posting newcomer
  • *
  • Posts: 19
Re: gcc debugger can not run
« Reply #7 on: October 05, 2019, 08:02:10 am »
Sorry for puzzle you! It seems that the default mingw compiler Code::Blocks shipped with only support X86 on Windows. What I need is X64 binary exe, and this is the origin of evil.
By the way, you can easily reproduce this phenomenon by create a simple wxWidgets Dialog based GUI project,and comment the dialog set up lines in xxApp::OnInit() function,
then run the program in debug mode. At this time, the X64 GDB debugger would hang up,you could not stop it by press the debug button.

Code: [Select]
    // following lines are C::B auto-generate code, comment them, no dialog would present(intend to do this), and the X64 GDB debugger would hang up
    // sbvpnDialog* dlg = new sbvpnDialog(0L);
    // dlg->SetIcon(wxICON(aaaa)); // To Set App Icon
    // dlg->Show();

I hope Code::Blocks could fix this bug in the next patch version.  ;D

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 2553
Re: gcc debugger can not run
« Reply #8 on: October 05, 2019, 08:47:40 pm »
On windows only a 64bit application can stop 64bit applications. So if you debug a 64bit application you have to use 64bit codeblocks and 64bit gdb.
You can get a 64 bit codeblocks by using the nightly build from this forum or build it by yourself
You can get a 64bit gdb from for example mingw64 project. We do not distribute "offically" compiler and gdb...

If this does not fix your problem can you post a debug log? You first have to enable full debug logging in the debug settings.

Offline jacksmith

  • Single posting newcomer
  • *
  • Posts: 6
Re: gcc debugger can not run
« Reply #9 on: October 07, 2019, 01:27:33 pm »
I'm new in codeblocks. I've installed codeblocks-17.12mingw but there's a problem when I open codeblock it shows a error bellow

Environment error

Can't find compiler executable in your configured search path's  for Microsoft Visual C++ Toolkit 2003.   
Please see the attachment.
Thanks

Note: I'm using windows 10 64 bit

Offline codelighter

  • Multiple posting newcomer
  • *
  • Posts: 19
Re: gcc debugger can not run
« Reply #10 on: October 07, 2019, 02:45:46 pm »
@BlueHazzard It's a pity to hear that X64 C::B on windows is not supported officially. I think X64 is a growing trend, X32 version would be obsolete in the coming days.
Build X64 nightly version  by myself is not a good choice, and is also awkward for most of newbies who use C::B for the first time.

I know build a fully-featured IDE project is not an easy thing, especially for beginners. Experienced masters are the perfect guys to do the tough and dirty work,
as they have already done in Unix-like OS.
  ;D

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6667
    • My Best Post
Re: gcc debugger can not run
« Reply #11 on: October 07, 2019, 03:43:21 pm »
@BlueHazzard It's a pity to hear that X64 C::B on windows is not supported officially. I think X64 is a growing trend, X32 version would be obsolete in the coming days.
Build X64 nightly version  by myself is not a good choice, and is also awkward for most of newbies who use C::B for the first time.

I know build a fully-featured IDE project is not an easy thing, especially for beginners. Experienced masters are the perfect guys to do the tough and dirty work,
as they have already done in Unix-like OS.
  ;D

Is clicking and downloading on 3 zip files beyond you?
Note: You also need to extract them into a folder.
Edit: http://forums.codeblocks.org/index.php/topic,23498.0.html

Tim S.
« Last Edit: October 07, 2019, 03:45:49 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 2553
Re: gcc debugger can not run
« Reply #12 on: October 07, 2019, 08:30:00 pm »
Quote
@BlueHazzard It's a pity to hear that X64 C::B on windows is not supported officially.
64bit is supported... You simply have to use a 64bit version of codeblocks, that is provided over the nightlies. And nightlies are really not difficult to use as  stahta01 pointed out.

We have to provide a new release, i agree here, but it is difficult, there are too many open points at the moment to make a release (IMHO)...

Offline codelighter

  • Multiple posting newcomer
  • *
  • Posts: 19
Re: gcc debugger can not run
« Reply #13 on: October 08, 2019, 03:09:54 am »
@stahta01 and @BlueHazzard, thanks for your effort and patient! I have downloaded the newest build zip file and will have a try on my computer after a while.
At last, I want to say, with your solid support, the Code::Blocks is becoming stronger and more powerful than any time in history. C::B is really a great creation!
God Bless You! industrious genius! ;D
« Last Edit: October 08, 2019, 03:18:17 am by codelighter »