Gdb Gcc

This is a discussion on Gdb Gcc within the Tech Board forums, part of the Community Boards category; Im using gcc on windows (cygwin) and am currently using GDB to debug a program. But I find the console ...

  1. #1
    Registered User
    Join Date
    Jan 2007
    Posts
    330

    Gdb Gcc

    Im using gcc on windows (cygwin) and am currently using GDB to debug a program.
    But I find the console interface rather clumsy. Is there a better, more windowslike alternative that works immediately with gcc?

  2. #2
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    Code::Blocks and Dev-C++ ought to have debugging support.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  3. #3
    Registered User Jaqui's Avatar
    Join Date
    Feb 2005
    Posts
    416
    and they actually run as gui windows apps so you don't see the cli underpinnings at all.
    Quote Originally Posted by Jeff Henager
    If the average user can put a CD in and boot the system and follow the prompts, he can install and use Linux. If he can't do that simple task, he doesn't need to be around technology.

  4. #4
    Registered User
    Join Date
    Jan 2007
    Posts
    330
    ok thanks. which one would you recommend?

  5. #5
    Registered User
    Join Date
    Jan 2007
    Posts
    330
    I forgot to tell that I make binaries for the coldfire m68k processor with gcc.

    and the project outline is like this.

    src\
    src\dir1
    src\dir2

    etc

    The src dir contains a makefile that contains global setting and every subdir contains a makefile that contains all the C sourcefiles to include.

    I made a project with codeblocks and added all directories, makefiles and sources to it. But the very first C source doesnt compile because it cant find an included header in the same directory. Do I need special options for that or how do I fix that?

  6. #6
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,046
    But the very first C source doesnt compile because it cant find an included header in the same directory. Do I need special options for that or how do I fix that?
    It should work as long as you use double quotes instead of angle brackets:
    Code:
    #include "header.h"
    But if not, you could always add "-I ." to GCC's command line.

    Also, something important to note: when GCC uses optimisations, it can really mess up GDB. I don't know if your compiler options include enabled optimisations, but if they do, try turning them off if, when you debug a program, the current line keeps jumping around.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. buffered vs unbuffered question
    By Overworked_PhD in forum Linux Programming
    Replies: 6
    Last Post: 07-04-2008, 04:57 PM
  2. Memory allocation error
    By cunnus88 in forum C++ Programming
    Replies: 5
    Last Post: 01-25-2008, 03:24 PM
  3. Contiguous Array version of Linked List
    By ampersand11 in forum C Programming
    Replies: 19
    Last Post: 10-07-2007, 03:05 AM
  4. Too much output in GDB
    By MacNilly in forum Tech Board
    Replies: 0
    Last Post: 09-13-2006, 12:45 PM
  5. does gdb lie?
    By dinjas in forum C Programming
    Replies: 8
    Last Post: 03-10-2005, 04:17 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21