You should also add an extra -ggdb to give the binary some extra 
information usefull to gdb.

HJ Hornbeck a �crit:
> Keith Robinson wrote:
> 
>> I am sure this is a painfully easy question:
>>
>> I am installing a progam from source. How do i compile it so that
>> later I can run debug it with gdb? I've tried alias gcc='gcc -g'
>> (from bash) but that doesn't  work. I've tried setting CC = gdd
>> -g in the Makefile, but that doesn't work, at least doesn't
>> appear to.
>>  
>>
>    Does the makefile define CFLAGS and LDFLAGS? They contain the comand 
> line options for the compiler and linker, respectively. Insert "-g" into 
> both, I remember having a fair bit of difficulty when I tampered with 
> CFLAGS only.
> 
>        HJ Hornbeck



Reply via email to