This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: how to use libgcc2.c


qinfeng.zhang@philips.com wrote:
In gcc source code, there is a file "libgcc2.c" in srcdir/gcc. It seems that this file is used to
implement operation through software method. But I don't know using it, and I can't debug into this
file.

libgcc contains compiler support routines. It is used automatically by the compiler if the source code performs an arithmetic operation that requires calling a function to perform it. For instance, a long long divide on many targets will generate a call to a libgcc function.


User source code should not call any routines in libgcc.

There shouldn't be any need to debug routines in libgcc, but it should be possible if you have a copy of the gcc sources available. Some old versions of gcc compiled libgcc with -g1 which makes debugging difficult. You can change the gcc Makefile to use -g instead if necessary.

Jim


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]