dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: GCC debugger (GDB)

  1. #1
    John E is offline Elite Member Power Poster
    Join Date
    Apr 2001
    Location
    Manchester, England
    Posts
    4,489

    GCC debugger (GDB)

    Not sure if this should be here or in the Chit Chat forum but here goes...

    Maybe about 10 years ago I made the effort to switch from MSVC to GCC (primarily because it's cross-platform) but I soon gave up when I tried to use the GCC debugger (GDB). Admittedly this was 10 years ago but it was truly dreadful compared to debugging in Visual C++. For example, break points all needed to be set up before GDB got launched (i.e. you couldn't set break points 'on-the-fly') and each break point seemed to increase the debugger's startup time very considerably. From what I can recall, setting just 4 break points would cause the debugger app to take around 6 or 7 minutes to launch itself!! And IIRC you couldn't enable or disable break points during a debugging session, you couldn't inspect variable values easily (or maybe you could inspect them but not change them?) Nor could you change the order of execution on-the-fly - all of which are trivial in VC++

    Does anyone here use GDB on a regular basis? I'm thinking about revisiting GCC but I just wondered how much the debugger has improved.
    "A problem well stated is a problem half solved. - Charles F. Kettering

  2. #2
    Join Date
    Feb 2017
    Posts
    344

    Re: GCC debugger (GDB)

    Quote Originally Posted by John E View Post
    Maybe about 10 years ago I made the effort to switch from MSVC to GCC (primarily because it's cross-platform)
    I've only been using Visual Studio (VS) so far but I have a mental picture of what I will do if I go multi-platform.

    I will first check out to which extent I can still use VS on Windows to develop for other platforms. I looks like Microsoft is taking VS in this direction. At least theoretically it's possible to use the CMake build system with VS on Windows and then port the source files to some target platform and build an executable there with some other compiler.

    https://docs.microsoft.com/en-us/vis...s#developLinux

    Then I will check out the new VS Code IDE which is both multi-platform and multi-language. I suppose since it's a Microsoft IDE it will potentially be as good as the original VS.

    https://code.visualstudio.com/docs/editor/whyvscode

    Then I will have a look at other multi-platform IDEs. I know there are several but I will start with Eclipse mostly because I used it during my Java days many years ago and found it excellent.

    https://www.eclipse.org/cdt/

    Note the difference between VS and GDB: VS is an IDE whereas GDB is a tool closely associated with the GCC compiler (that is GDB is part of the GCC tool-chain). So I don't quite see GDB as an alternative to VS. That would be like comparing apples and oranges. In my view an alternative to VS must be some other IDE.

    The preferred compiler to use with Eclipse seems to be the GCC,

    https://www3.ntu.edu.sg/home/ehchua/...Cpp_HowTo.html

    I don't know if this means Eclipse also uses the GDB debugger under the hood but it shouldn't matter because what counts is the debugging experience, not how it's accomplished.
    Last edited by wolle; September 14th, 2018 at 01:56 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)