[RFA] Cleanup: Use add_sal_to_sals for expressions
Keith Seitz
keiths@redhat.com
Tue Jul 17 21:29:00 GMT 2012
Hi,
Currently convert_linespec_to_sals treats expressions a little
differently than other linespec conversions. It allocates a SaL, fills
it in, and then relies on decode_line_full to fill in the "missing"
canonical name.
This patch causes expressions to use add_sal_to_sals, which will then
set a canonical name for the linespec, thereby negating the need to
double-check for missing linespecs later (in decode_line_full).
[This would not be committed until after the 7.5 branch is cut. While I
haven't run into the new assert, I would feel better with more
people/platforms using this before pushing this to the public.]
Keith
ChangeLog
2012-07-17 Keith Seitz <keiths@redhat.com>
* linespec.c (add_sal_to_sals): Use SYMNAME as
canonical if it is non-NULL and no symtab is set in
the SaL.
(convert_linespec_to_sals): Use add_sal_to_sals for
expressions, too.
(decode_line_full): No need to "fill in missing canonical names"
anymore. Simply make cleanups for the allocated names.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: use-add_sal_to_sals-for-expressions.patch
Type: text/x-patch
Size: 1951 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20120717/a736f463/attachment.bin>
More information about the Gdb-patches
mailing list