<div dir="ltr">Will do...<div><br></div><div>thanks again...</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 23, 2017 at 6:25 PM, Jim Ingham <span dir="ltr"><<a href="mailto:jingham@apple.com" target="_blank">jingham@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Yeah, that would be easy to implement from the command line, maybe add a --file-is-regex flag or something.<br>
<br>
>From the SB API it would be better to have something like:<br>
<br>
SBFileList SBTarget.<wbr>GetFileListMatchingRegex("<wbr>regex")<br>
<br>
Please file an enhancement request for these of hack'em in if you're so motivated.<br>
<span class="HOEnZb"><font color="#888888"><br>
Jim<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
> On Oct 23, 2017, at 6:13 PM, Don Hinton <<a href="mailto:hintonda@gmail.com">hintonda@gmail.com</a>> wrote:<br>
><br>
> Ah, great, thanks.  I just figured the default was the same for both.<br>
><br>
> Just wish I could use a regex for the filename as well, which would cut down the number of files about about half.<br>
><br>
> thanks again...<br>
> don<br>
><br>
> On Mon, Oct 23, 2017 at 6:02 PM, Jim Ingham <<a href="mailto:jingham@apple.com">jingham@apple.com</a>> wrote:<br>
> Just pass an invalid FileSpec for the source file spec, like:<br>
><br>
> lldb.target.<wbr>BreakpointCreateBySourceRegex(<wbr>"printf", lldb.SBFileSpec())<br>
><br>
> and it acts the same way as the --all-files option.  That was pretty non-obvious, I'll update the docs.<br>
><br>
> Actually, the thing you CAN'T do is get the command line behavior where lldb uses the "default file" i.e. when you run "break set -p" but don't supply a file or the --all-files option.  That seemed to me less useful for a programming interface since the default file is history dependent (it's the file with "main" in it before you run, then it's where you last set a breakpoint, or where you last stopped, etc.)  If you needed this behavior it would be better to have the target vend the default file, though right now that's really only maintained by the breakpoint command...<br>
><br>
> Jim<br>
><br>
><br>
> > On Oct 23, 2017, at 5:31 PM, Don Hinton via lldb-dev <<a href="mailto:lldb-dev@lists.llvm.org">lldb-dev@lists.llvm.org</a>> wrote:<br>
> ><br>
> > The only way I've been able to do it is by using the CommandInterpreter, i.e.,<br>
> ><br>
> >   res = lldb.SBCommandReturnObject()<br>
> >   lldb.debugger.<wbr>GetCommandInterpreter().<wbr>HandleCommand('breakpoint set -p "diag::%s" --all-files -N %s' % (name, name), res);<br>
> >   lldb.debugger.<wbr>GetCommandInterpreter().<wbr>HandleCommand('breakpoint disable %s' % name, res);<br>
> ><br>
> > Is this the best way to do it?  Can't seem to figure out how to use SBTarget.<wbr>BreakpointCreateBySourceRegex(<wbr>) for all files.<br>
> ><br>
> > thanks...<br>
> > don<br>
> > ______________________________<wbr>_________________<br>
> > lldb-dev mailing list<br>
> > <a href="mailto:lldb-dev@lists.llvm.org">lldb-dev@lists.llvm.org</a><br>
> > <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/lldb-dev</a><br>
><br>
><br>
<br>
</div></div></blockquote></div><br></div>