This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch 0/2] physname reg.: C++ breakpoints / linespec fixes
- From: Tom Tromey <tromey at redhat dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 07 Jun 2011 14:23:53 -0600
- Subject: Re: [patch 0/2] physname reg.: C++ breakpoints / linespec fixes
- References: <20110605202615.GA20427@host1.jankratochvil.net>
>>>>> "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