A Saturday 03 May 2008 21:27:44, Daniel Jacobowitz wrote: > On Sat, May 03, 2008 at 09:19:27PM +0100, Pedro Alves wrote: > > 2008-05-03 Pedro Alves > > > > 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. Thanks, I installed it -- better keep this regression fix separate from follow up improvements. > 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); Yes, looks like it. At some point, it may even be better to get rid of expression_context_block in the language parsers, in favor of expression_context_pc for variables declared midblock, I guess: { a = 1; f (); B b; g (); } I'll submit a patch to the insight side if the attached is OK. Tested on x86_64-unknown-linux-gnu. -- Pedro Alves