[RFA] linespec.c change to stop "malformed template specification" error

Fernando Nasser fnasser@redhat.com
Thu Jun 7 06:00:00 GMT 2001


Jim Blandy wrote:
> 
> So how does our poor little decode_line_1 handle that?  Basically, we
> need to replace decode_line_1 with a real parser.
> 

It will be hard.  As it accepts a variety of types of input, there are
ambiguities in the allowed syntax that are hard to describe in any
formal language.

What I am trying to say is that, although the current implementation may
be lame, the problem is more fundamental -- it is the concept of
linespec itself with the "accept anything with any system variant and
language variant from function names to filenames and line numbers and
combinations thereof".

With this search space, I guess the heuristic method that exists today
became the only one that was feasible to implement.

Maybe we could improve things if GDB commands were parsed under some
language context (e.g. care about C++ stuff or not) and even some host
context (to distinguish filename syntaxes between Unix and Windows for
instance).

Cheers,
Fernando

-- 
Fernando Nasser
Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9



More information about the Gdb-patches mailing list