From: Oscar F. <of...@wa...> - 2002-09-12 17:48:44
|
"Dan Muller" <do....@sp...> writes: > Oscar (or anyone else that has answers), > > Here and in at least one other thread, you recommend using a cygwin build of > 5.2.1. I don't currently have cygwin installed, so I have a couple of > questions before I go through the bother of setting up an environment so I > can build this. (I live behind a modem, so it's worth my time to think > before downloading.) Specifically, with the few binary versions of gdb that > I've tried recently, I've seen these problems when working with executables > built by MinGW 1.1: > > 1. problems with interpreting the source file names embedded in executables. > > 2. inability to catch unhandled exceptions and assertion failures > > I found workarounds for both of these problems, but they're > awkward. For the file names, setting the directory path in gdb > allows it to find source files. I do a lot of C++ work with several > template-based libraries, so I have to define a whole bunch of > directories. For the other problem, I think I can catch failures by > setting a breakpoint on __terminate, although I'm not sure this is > reliable. Using a gdb.ini file helps a lot with both of these > workarounds. Thanks for sharing all this info. > So, if I go through the effort of installing Cygwin, building gdb > 3.2.1 with it, and switching to MinGW 2.0, will the debugging > environment be smoother? It would be smoother only as far as some problems present on previous versions are fixed on the new one :-) The filepath problem should still be there. A big annoyance I found with gdb 5.x and gcc 3.x is that, often, the debugger seems confused while looking for the source code and picks an unrelated file (almost always the same one, a header file that only contains template definitions) and you can't step into some code. > If not, then can you give some idea of how big a task would it be to > 'port' gdb to a pure MinGW environment? I have not the slightest idea, sorry. Others, based on the size of the patch for gdb 5.1.1, said that it doesn't look as an easy task. > I have no clear idea of what you guys go through to port gcc -- I > should probably peruse the diffs sometime. I'm an experienced C/C++ > developer, effectively already working two jobs, but if it's > something I could hack away at a little at a time... Some other people said they will try to port gdb. Maybe you all could coordinate the work? > I'm also wondering if it would be worth my while to investigate a > cross-compiling setup with remote debugging. Well, the gdb docs says gdbserver is easier to port than the full gdb, so maybe it is a good line of investigation. (My gut feeling is that the comm functionality it needs will give some work to port. Does the MinGW gdb 5.1.1 supports remote debugging, or it is simply disabled?) I'm afraid that the annoyances about C++ exceptions and the one I described above will stay there anyways. I seldom use gdb but Christopher Faylor reported that there are problems with gdb + C++. Maybe you should ask on the gdb mailing list before putting too much time on the effort, and wait for a better release if the current one is too much broken. [snip] > Thanks in advance. I really appreciate this mailing list, it's great! You're welcome. -- Oscar |