This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: expressions with C preprocessor macro info


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]