help-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Does the version of compiler infuce the performance of gdb?


From: Linda
Subject: Does the version of compiler infuce the performance of gdb?
Date: 20 Feb 2006 23:22:17 -0800
User-agent: G2/0.2

I wrote a rather simple program named main.cpp, which is like the
follows:

int main()
{
    return 0;
}

And its Makefile is like the follows:

CCC=/opt/SUNWspro/bin/CC

DEBUG= -g

CFLAGS=$(DEBUG)

main  : main.o
        $(CCC) $(CFLAGS) $^ -o $@
main.o: main.cpp
        $(CCC) -c $(CFLAGS) -o $@ $?
clean:
        rm -f *.o
        rm main

After I type "make" on the screen, I got its executable file named
main.

But when I type "gdb main", I got:

GNU gdb 5.0
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "sparc-sun-solaris2.6"...(no debugging
symbols found)...

So I cannot debug normally. But if I change CCC to g++, gdb can work
normally. So is the version of the compiler is crucial for gdb? And how
can I make gdb work normally?

Thanks!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]