[patch 0/2] physname reg.: C++ breakpoints / linespec fixes

Tom Tromey tromey@redhat.com
Tue Jun 7 20:24:00 GMT 2011


>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:

Jan> linespec is IMNSHO a hack anyway and one day it should be merged
Jan> with the general expression parser (used for example for `print');
Jan> which should be further merged with GCC/G++ parser.  Expression
Jan> Parser Plug-In Available
Jan> http://sourceware.org/ml/archer/2011-q1/msg00122.html

I am not sure this is the right direction.  I have a few issues with it.

First, it seems to me that we'll always have to keep some part of
linespecs around, because 'break file:line' is important.  So, we'll
always have to look at the argument in multiple ways and decide what to
do.

Second, I suspect this ties linespecs too closely to the current language.
It seems reasonable to me for 'break ns::func()' to work in a C frame.

Third, IIRC your branch is based on the idea of the parser constructing
an expression, which is then decoded (or evalled?) to find the correct
symbol.  I think this approach neglects the possibility that a linespec
could be ambiguous, another hot topic.

That said, I would welcome a detailed plan to redo linespec.  Maybe
those objections are not very strong.

Tom



More information about the Gdb-patches mailing list