• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
cgdb instead of gdb (or sudo gdb)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

cgdb instead of gdb (or sudo gdb)


  • Subject: cgdb instead of gdb (or sudo gdb)
  • From: Kyle McKay <email@hidden>
  • Date: Fri, 17 Jul 2009 16:12:47 -0700

There have been several posts recently talking about using gdb instead of the Xcode debugger for debugging in various situations.

I highly recommend using cgdb (instead of using gdb directly) in these cases.

  http://cgdb.sourceforge.net/
  http://cgdb.sourceforge.net/screenshots.php

cgdb is a curses front end to gdb that provides constant, auto- updating display of the source file along with breakpoint and current line indicators whereas gdb by itself only provides line-based source file display on demand (the gdb list command).

cgdb can easily be installed via MacPorts or from the installer on the cgdb downloads page.

It takes exactly the same command line arguments as gdb and can be used over an ssh terminal session and/or with sudo just like gdb. cgdb uses the system's gdb to actually do the debugging (the same way Xcode uses the system's gdb) and so supports everything that the native Mac OS X gdb does.

It's a shame that Apple doesn't include cgdb as part of the developer tools package that installs gdb as it really beats having to continually use the gdb list command to see where you are during a debugging session in which you need to use gdb directly instead of the Xcode debugger (for whatever reason).

(NOTE: The gdb source files themselves do have a "TUI" feature that provides functionality similar cgdb, but the Apple gdb is built with this feature disabled. If you have used the "gdb -tui" option on other platforms, cgdb provides a superset of the functionality you would find in "gdb -tui" and is available on Mac OS X.)

Kyle
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: cgdb instead of gdb (or sudo gdb)
      • From: Jim Ingham <email@hidden>
  • Prev by Date: Re: How to debug BetterAuthorizationSample
  • Next by Date: Re: How to debug BetterAuthorizationSample
  • Previous by thread: Re: How to debug BetterAuthorizationSample
  • Next by thread: Re: cgdb instead of gdb (or sudo gdb)
  • Index(es):
    • Date
    • Thread