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 1/3] Linespec rewrite: Parsing


On Sun, Mar 25, 2012 at 08:39:41PM -0400, Daniel Jacobowitz wrote:
> On Sat, Mar 24, 2012 at 1:23 PM, Keith Seitz <keiths@redhat.com>
> wrote:
> >
> > On 03/24/2012 06:04 AM, asmwarrior wrote:
> >
> >> [debug]> break
> >> "E:/code/cb/cb_trunk/src/plugins/codecompletion/parser/token.cpp:64"
> >> [debug]unmatched quote
> >
> >
> > This is now an illegal linespec. You do not need to quote this at
> > all. This is one of the motivating factors for doing this rewrite:
> > the quoting is _out of control_. [If you do want to quote it, ONLY
> > quote the filename portion.]
> >
> > It appears you may be using the patches I submitted to the list.
> > I've committed one or two additional patches for problems I've found
> > to the archer branch, one of which deal specifically with quoting
> > and embedded colons.
> >
> > I encourage you to try that branch:
> >
> > (gdb) break
> > E:/code/cb/cb_trunk/src/plugins/codecompletion/parser/token.cpp:64
> >
> > No source file named
> > E:/code/cb/cb_trunk/src/plugins/codecompletion/parser/token.cpp.
> >
> > Leaving the quoting in place will force the lookup of the function
> > "E:/.../token.cpp:64", which I'm guessing is not what you really
> > want. :-)
> 
> This is the change of behavior I think most likely to blow up.
> -break-insert proxies straight through to the CLI break command; have
> you checked what various other IDEs send today?

The most robust "solution" I am aware of is something along the lines of

  "-break-insert \"\\\"" + c_style_escape(file) + "\\\":" + line + '"'

together with a c_style_escape taking care of spaces, quotes etc.
This should also be resilient under the proposed changes.

Using the more intuitive  quote + filename:line + quote  has not been
sufficient in the past as far as I can tell.

Andre'


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