This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 126376 - gdb debugging a gtk application in mingw environment / setup...
Summary: gdb debugging a gtk application in mingw environment / setup...
Status: RESOLVED INVALID
Alias: None
Product: cnd
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 6.x
Hardware: PC Windows ME/2000
: P2 blocker (vote)
Assignee: _ gordonp
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-31 12:03 UTC by martinpjvr
Modified: 2009-06-25 10:59 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Complete description and testing report of Issue (23.48 KB, application/octet-stream)
2008-01-31 12:05 UTC, martinpjvr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description martinpjvr 2008-01-31 12:03:19 UTC
GDB only works for my console applications, but
not for the GTK apps !? I'm a bit at a lost
here since I have not yet disabled the console window for the app
during development, and it should
work with that attached process... 
I even enabled the compiler switch -mwindows to remove the console
but the debugging still does not work!
Comment 1 martinpjvr 2008-01-31 12:05:09 UTC
Created attachment 55831 [details]
Complete description and testing report of Issue
Comment 2 martinpjvr 2008-01-31 12:10:03 UTC
Please see attachment for a full detailed compilation of the testing already done...
Comment 3 Peter Pis 2008-02-01 10:04:07 UTC
Reassigning to "cnd".
Comment 4 _ gordonp 2008-02-01 16:06:11 UTC
According to all 3 gdb log files, the debug session hung while expecting input from gdb
in response to ptype commands (ptype requests detailed type information). While gtk on
Windows isn't a priority, it seems unlikely this is limited to gtk, which makes it a
justifiable P2.
Comment 5 _ gordonp 2008-02-24 01:06:13 UTC
The problem is with the gtk libraries you're using. They are mixed mode Windows NT PE and Windows CUI. I
googled this and it turns out gdb doesn't debug this mode well. Its not completely broken (gdb), but
doesn't seem to handle breakpoints.

Have you considered trying the gtk packages in Cygwin? I'm not a GTK developer (Unix or Windows:-) so
I don't know if these will work for you or not.
Comment 6 martinpjvr 2008-02-24 19:18:48 UTC
Well, I'm in a bit of a pickle here, since Cygwin is not really an option for me here...
(We do not wish to have the larger environment of Cygwin running in production. Not my call ;-/ )
Yes the GTK packages will most likely work fine in Cygwin. But this is unproven here since I have
not used NB6 with Cygwin, and unfortunately it will most likely not happen any time soon.
I see most Window development mostly in MinGW that in Cygwin for the GUN tools in any event...

So, hold on!! This is going to be slightly windy but its to give you some background of what we are doing:

It stands to reason that if the GDB works for me on the command line (for the same source code + GTK
linked libraries) it should not be a problem in any IDE using same GDB... 
(Then again I have never interfaced GDB into an IDE so I digress. ;) )

So I approached this as follows:
I have successfully setup a codeblocks IDE with the exact same MinGW environment and versions that
I used in the NB6 testing / usage. And I can confirm that this is working without any problem when I debug
the same source code & libraries I link with for GTK. So from this I can only deduce that the interfacing
is not working as it should, between GDB / NB6 IDE. (Once again no proof, only conjecture on my part)

I can also state that I have successfully setup & used the MinGW / GDB & GTK development install
 (same versions as per original logged issue) 
for Windows 2000 / Windows Vista & Windows XP SP2. All of them did have the same debug problem in NB6.

There is one workaround and one solution here: 
* The workaround is to use the NB6 IDE as per normal except the debugging, and simply debug the GTK application from
the command line. This proposal was a not accepted very fondly by my fellow colleagues.

* The current solution is to use the codeblocks IDE (latest stable nightly build) to resolve the debugging issue.
I am currently still testing this IDE and so far most of our requirements are met.

Ubuntu & Fedora 7 work well with both IDE's as well, so this is why I am comparing them currently...
Other IDE's will follow later.

The C/C++ IDE requirements are as follows:
1. x-platform capable.
2. Fully integrated IDE for the basic tools for editing / building and debugging.
3. No over complex makefile generation and project management, should be able to run makefiles from
 command line and project setup should have a easy intuitive GUI interface. 
 (NB6 C/C++ IDE in my opinion is doing this perfectly! If you want more then get more, but leave the base simple.)
 (Not sure codeblocks does generate a makefile, still investigating. Also the IDE is starting to overkill even in the
 base level functionality, We don't want Visual Studio for everything, only C/C++)
4. Use a common OS platform compiler standard, such as the GNU gcc & bintools.
5. Have a strong help DB, online or offline, such as the MSDN (Microsoft really kick ass here!) It must be standardized
and easy to configure if sources are fragmented. (However still have to see this other than the MSDN)
6. Basic code template & project template facilities for RAD.
7. Regular support and updates for any Issues to be resolved or already resolved. (No browsing allover but a centralized
facility, like netbeans forums / sun web site)

Well there you have it.
Looking forward to your next release!