@JosDuchit:
I think you have to perform the final link with -g as well. Certainly I have -g in both the gcc -c command line and the link line.
eg:
CFLAGS = -mcrt=newlib -O2 -fomit-frame-pointer -fno-builtin -fstrength-reduce -c\
-D__NOGLOBALIFACE__ -D$(DBUG) -D$(ENV) -mmultiple \
-Iinc/ -I../../../include \
-Wall -W -Wundef -Wshadow -Wpointer-arith \
-Wsign-compare -Wmissing-prototypes \
-Wmissing-declarations \
-Waggregate-return -Wwrite-strings -Werror -g
LDFLAGS = -mcrt=newlib -nostartfiles -g
translate offsets to library calls
- tonyw
- AmigaOS Core Developer
- Posts: 1479
- Joined: Wed Mar 09, 2011 1:36 pm
- Location: Sydney, Australia
Re: translate offsets to library calls
cheers
tony
tony
Re: translate offsets to library calls
When using debugging it is best to use -gstabs on both the compiler and linker lines. Just using "-g" may not always work when binaries get large.
ExecSG Team Lead
Re: translate offsets to library calls
@TonyW
Till now i just compile and link directly.
gcc guis:Dev/G4C_2011/guiNotCleaned.c -xc -gstabs -lm -lauto -o guis:G4T11nco
gcc guis:Dev/G4C_2011/guiIFace.c -xc -gstabs -lm -o guis:G4T11if
Both those sources do the same job , in the last i have opened all 9 libraries explicitly.
Both "include" a large number of "header files" eg window.h that in fact contain specific funtions.
I looked at your CFLAGS and was rather puzzled : are you suggesting i should use them? I looked through the gcc handbook to know what they mean. Frankly for some of them i still don't see the light.
At this stage i surely am not interested in optimizing, and the use of -Werror would prevent the source from compiling since i have not yet cleaned up deprecated functions (Seek, Examone, ..) most of the time.
Could you explain your -D options (which are not found in the gcc handbook ) ? Thanks
Till now i just compile and link directly.
gcc guis:Dev/G4C_2011/guiNotCleaned.c -xc -gstabs -lm -lauto -o guis:G4T11nco
gcc guis:Dev/G4C_2011/guiIFace.c -xc -gstabs -lm -o guis:G4T11if
Both those sources do the same job , in the last i have opened all 9 libraries explicitly.
Both "include" a large number of "header files" eg window.h that in fact contain specific funtions.
I looked at your CFLAGS and was rather puzzled : are you suggesting i should use them? I looked through the gcc handbook to know what they mean. Frankly for some of them i still don't see the light.
At this stage i surely am not interested in optimizing, and the use of -Werror would prevent the source from compiling since i have not yet cleaned up deprecated functions (Seek, Examone, ..) most of the time.
Could you explain your -D options (which are not found in the gcc handbook ) ? Thanks
Re: translate offsets to library calls
I recall that either -gstabs or -ggdb (not sure if I tried both) did not work with a particularly large C++ program (about 80k lines, 3MB stripped executable). I think the intermediate assembler didn't like some long names in the (artificially generated) source code.ssolie wrote:When using debugging it is best to use -gstabs on both the compiler and linker lines. Just using "-g" may not always work when binaries get large.
So I ended-up using just -g , which seemed to work fine in my large program. Why might it not?