This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: How to enable debug code?
- From: Pedro Alves <palves at redhat dot com>
- To: Fei Ding <fdingiit at gmail dot com>, "gdb at sourceware dot org" <gdb at sourceware dot org>
- Date: Wed, 08 Jul 2015 11:02:31 +0100
- Subject: Re: How to enable debug code?
- Authentication-results: sourceware.org; auth=none
- References: <CAGmPkfKZY6LaKsOHMnDMMFtpHmDE5-ahJ7+WFDiPABTXif_0-A at mail dot gmail dot com>
On 07/08/2015 04:11 AM, Fei Ding wrote:
> Hi, there:
>
> I met some problem when enabling debug code, here it is:
>
> I want to debug the YACC of GDB command line. Specifically, I want
> this code to work: `YYDPRINTF ((stderr, "Starting parse\n"));', which
> at c-exp.c
>
> So I've tried
> 1. make 'CFLAGS=-DYYDEBUG'
> 2. make YYDEBUG=1
>
> Both failed. Any hint? Thanks.
No need to build any differently. Just do "set debug parser on".
Thanks,
Pedro Alves