This is the mail archive of the gdb@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: How to set a breakpoint in file, which name has spaces?


On Thu, Aug 10, 2006 at 09:36:35AM -0700, Nikolay Molchanov wrote:
> I would be happy to take a look at the discussion.
> IMHO a good solution is to use '\ ' to escape spaces. It is standard 
> Unix approach.
> The real '\' character should be passed as double '\' ("\\").
> What is nice, it works just great in "-file-exec-and-symbols" command, 
> so it seems
> a pretty straight forward solution to make other commands consistent 
> with this one.

No.  The manual describes the quoting rules that MI is supposed to use;
some commands violate them, but this one doesn't.  It's too late to
change how it's supposed to work now.

> >So if you want to simulate:
> > break 'C:/Documents and Settings/foo.c':17
> > 
> >
> Unfortunately this does not work:

Apparently you need to use double quotes.  I'm not sure why.

> >You'd need
> > -break-insert "'C:/Documents and Settings/foo.c':17"

Which would mean
 -break-insert "\"C:/Documents and Settings/foo.c\":17"

-- 
Daniel Jacobowitz
CodeSourcery


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