[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to get gdb to trace through gmp?
From: |
Linus Nordberg |
Subject: |
Re: How to get gdb to trace through gmp? |
Date: |
21 Apr 2001 20:46:36 +0200 |
User-agent: |
Gnus/5.090002 (Oort Gnus v0.02) Emacs/20.6 |
Ronald Bruck <address@hidden> wrote
Sat, 21 Apr 2001 10:27:38 -0700:
First, is gmp compiled using the -g option?
Yes. But it's also compiled using the -O2 option, making debugging a
bit weird since some source code lines don't have any corresponding
machine code due to optimizations.
The makefiles are so complicated, I can't find a CFLAGS option
anywhere with the -g.
Try
$ ./configure
$ egrep CFLAGS mpz/Makefile
Can it be added from the command line?
Yes, either at configure time or at make time. The configuration is a
bit primitive concerning setting CFLAGS and CC by hand, but one way of
getting it right is to configure once without any special arrangements
and use CC and CFLAGS from a newly constructed Makefile as a starting
point. Then do
$ ./configure CC="compiler" CFLAGS="-flags"
At make time, just do
$ make CFLAGS="-flags"
Second, and in general: are there any performance penalties for using
-g? Size penalties, surely; I'm not concerned about that.
No.
Third, how do I get gdb to recognize and include gmp sourcefiles in
its disgorgements?
You shouldn't need to do anything special. Just keep the source file
where you compiled them.
--linus