Author Topic: Cross-Compile from Linux to Win32 gdb.exe hanging  (Read 4623 times)

Offline Kevr

  • Single posting newcomer
  • *
  • Posts: 2
Cross-Compile from Linux to Win32 gdb.exe hanging
« on: February 10, 2010, 03:22:57 am »
Hello codeblocks forum,

I am running Ubuntu 9.10 (Karmic Koala) and cross-compiling for Win32

There's a slight problem in which I can not find any information about searching this forum nor google.

First, I have followed everything in the post: http://forums.codeblocks.org/index.php/topic,3343.0.html

Except in the gdb.exe setup for a Win32 debugger I have downloaded and used the latest gdb.exe 5.2.1 instead of the insight package (which is not existant in that tutorial), aside from that everything is set up the same exact way.

The problem is:
  • When I compile and run under my default GNU GCC Compiler build, it works no problem.
  • When I compile and run under the new MingW32 Compiler build, the compilation works flawlessly but when I run it there is a slight hang after the gdb.exe console. After I press a key to end the debugger when my program is finished, the debugger window closes but there is a slight hang in Code::Blocks.
Note: I am using MinGW windows gdb.exe 5.2.1 in place of insight.
Note 2: The slight hang is only about 1-2 seconds... but I am a perfectionist, and this hasn't happened before. (It annoys me as well.)

Does anyone know why this is happening? I've been thinking maybe it's the updated gdb.exe or updated version of wine.

Thank you for responses, and if a fix post for this exists - sorry for posting, but I have searched far and wide with different sets of keywords and find nothing.
« Last Edit: February 10, 2010, 03:37:57 am by Kevr »

Offline Kevr

  • Single posting newcomer
  • *
  • Posts: 2
Re: Cross-Compile from Linux to Win32 gdb.exe hanging
« Reply #1 on: February 10, 2010, 03:44:08 am »
Seems I have misjudged what is doing the hanging, I've tested the same gdb.exe on both Win32 and Linux builds, the Win32 project executable(1MB) is much bigger than the Linux project executable(36KB).

Seems that the program size may be affecting it... I'm going to test around unlinking some libs and making it smaller, see what it does.

Sincerely sorry for my garbage post...

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: Cross-Compile from Linux to Win32 gdb.exe hanging
« Reply #2 on: February 10, 2010, 07:27:14 am »
Did you already read this:
http://wiki.codeblocks.org/index.php?title=Cross_Compiling_wxWidgets_Applications_on_Linux#Debugging ?
Just forget the wxWidgets part, if you don't need it.

I suggest not to use gdb 5.1.2, it's far too old! Oor do you mean the debugger shipped with MinGW 5.1.2 ?

gdb --version shows you the version-string.

I use 6.8 at the moment, the newest 7.0 snapshot created by ironhead should also do it (see here: http://forums.codeblocks.org/index.php/topic,11301.msg81448.html#msg81448 ).
The official 7.0.1 does not work reliable.

By the way on linux I just switched back from 7.0.1 to 6.80, because I was unable to debug C::B and wxWidgets together (needed to find bugs in wxWidgets trunk).
« Last Edit: February 10, 2010, 07:29:27 am by jens »