This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: expressions with C preprocessor macro info
- From: Daniel Jacobowitz <drow at false dot org>
- To: Pedro Alves <pedro at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Sat, 3 May 2008 16:27:44 -0400
- Subject: Re: expressions with C preprocessor macro info
- References: <200805032119.27919.pedro@codesourcery.com>
On Sat, May 03, 2008 at 09:19:27PM +0100, Pedro Alves wrote:
> 2008-05-03 Pedro Alves <pedro@codesourcery.com>
>
> gdb/
> * parse.c (parse_exp_in_context): Don't override
> expression_context_pc if get_selected_block returned a valid block.
>
> gdb/testsuite/
> * gdb.base/macscp.exp, gdb.base/macscp1.c: Add test for printing
> expressions with macros.
This patch is OK since it's clearly progress. But doesn't this mean
that we should be passing a PC to parse_exp_1, not a block? Otherwise
macros will not be correct in e.g. breakpoint conditions:
loc->cond =
parse_exp_1 (&arg, block_for_pc (loc->address), 0);
--
Daniel Jacobowitz
CodeSourcery