This is the mail archive of the
mailing list for the GCC project.
Re: building gcc with macro support for gdb?
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: Martin Sebor <msebor at gmail dot com>
- Cc: Peter Bergner <bergner at vnet dot ibm dot com>, Ryan Burn <rnickb731 at gmail dot com>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Fri, 4 Dec 2015 12:11:29 +0000
- Subject: Re: building gcc with macro support for gdb?
- Authentication-results: sourceware.org; auth=none
- References: <CACqP_ww+yFuYVZpXZJw+og3Zr776SvpiH1rtqO7SNKjmhm+1+g at mail dot gmail dot com> <1449107325 dot 7269 dot 9 dot camel at vnet dot ibm dot com> <5660674C dot 6050708 at gmail dot com>
On 3 December 2015 at 16:01, Martin Sebor wrote:
> On 12/02/2015 06:48 PM, Peter Bergner wrote:
>> On Wed, 2015-12-02 at 20:05 -0500, Ryan Burn wrote:
>>> Is there any way to easily build a stage1 gcc with macro support for
>>> I tried setting CFLAGS, and CXXFLAGS to specify "-O0 -g3" via the
>>> command line before running configure, but that only includes those
>>> flags for some of the compilation steps.
>>> I was only successful after I manually edited the makefile to replace
>>> "-g" with "-g3".
>> Try CFLAGS_FOR_TARGET='-O0 -g3 -fno-inline' and CXXFLAGS_FOR_TARGET='-O0
>> -g3 -fno-inline'
> I've been using STAGE1_CFLAGS as Andreas suggested. The tree
> checks in GCC make heavy use of macros that GDB unfortunately
> often has trouble with. See GDB bugs 19111, 1888, and 18881
> for some of the problems. To get around these, I end up using
> info macro to print the macro definition and using whatever it
> expands to instead. I wonder if someone has found a more
> convenient workaround.
GDB's python printers might be useful here, but someone would have to
do the work of re-defining the macros in python, and maybe keeping
them up to date with changes to the macros.