This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] 12843


Tom> (I'd like -break-insert to avoid linespecs completely, which would be a
Tom> big improvement IMO, ...

AndrÃ> From an MI client's point of view, passing all location information as 
AndrÃ> a single argument is neither wanted nor needed.

Yeah.  I am not sure why it works this way, as it seems to be against
the whole idea of MI.

AndrÃ> or even require everything to be quoted as in
AndrÃ>  25-break-insert  --file "some thing.cpp" --line "794"

There's no need; MI already defines an input quoting syntax that is
sufficient.

Tom> ... but of course we still have to worry about compatibility.)

AndrÃ> Just using new flags for the parameters should do the trick in this case.

AndrÃ> In general, in the past, differences between different versions
AndrÃ> of gdb have been large enough to require modifications in
AndrÃ> consumer code anyway (both to take advantage of new features, and
AndrÃ> to handle incompatibilities in input syntax), so requiring 100%
AndrÃ> "feature" compatibility _just for the sake of it_ is unlikely to
AndrÃ> be helpful. At least I would prefer a syntax with simple, uniform
AndrÃ> quoting rules over ad-hoc solutions tied to a specific OS or file
AndrÃ> system.

For MI, I don't think there is any issue.  We can just add options to
-break-insert.  (I don't know of anybody specifically working on this,
but I will at least put it in bugzilla.)

My view is that it is best to be compatible with existing "reasonable"
practice when possible, where "reasonable" means something akin to "has
actually happened".

In this case I think we can simplify linespec lexing without unduly
breaking things.

Tom> I think adopting these rules will make some of my ambiguous linespec
Tom> changes simpler. 

AndrÃ> I wonder whether it would be possible to just leave the current syntax
AndrÃ> unchanged, and introduce a new, better behaved syntax and use some
AndrÃ> global setting for toggling between them. So everybody concerned about
AndrÃ> compatibility would not notice a change, and the others would put 
AndrÃ>   'set breakpoint syntax 2011'  [or whatever]
AndrÃ> in their .gdbinit and could use the new way.

My first reaction is against this, but I don't have a particularly good
explanation for that.  I will think about it.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]