This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: PR gdb/856
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 29 Sep 2008 09:57:12 -0700
- Subject: Re: PR gdb/856
- References: <m3vdxdnp5s.fsf@fleche.redhat.com>
:REVIEWMAIL:
> The PR suggests that parse_exp_1 ought to take a sal instead, so this
> is what I've implemented. I changed any caller with access to a
> relevant sal or PC to use that; otherwise I changed the code to use
> either a sal constructed from the block's location, or an empty sal.
I am not sure about changing the block argument into a sal, and would
argue that changing it into a PC would be slightly better. Indeed,
apart from the macro-scoping that uses a SAL, all the parse routines
only really need a PC. Using a SAL would force some of the callers
that don't already have one at hand to compute it.
A nice corolary is that it would simplify your patch quite a bit
by getting rid of the need to: replace expression_context_pc by
expression_context_sal; and define a new function empty_sal.
Thoughts? Andrew Cagney and Jim Blandy both thought using a SAL
would be a good idea, so the SAL idea does have some weight, but...
--
Joel