[Lldb-commits] [PATCH] D74136: [LLDB] WIP: Follow DW_AT_decl_file when setting breakpoint
Jim Ingham via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Jun 11 09:53:55 PDT 2020
jingham added a comment.
In D74136#2087863 <https://reviews.llvm.org/D74136#2087863>, @jingham wrote:
> I need to read this in more detail at this point but I'm caught up in something else.
> One of the not so great design decisions I made was to try to have "break set" be a single command governed by flags. The way the command turned out, there are some flags that tell you what kind of breakpoint you are setting, and then other flags that qualify that kind of search. But that means --file can mean "I'm specifying the file to use to set a file & line breakpoint" or it can be a narrowing specifier for a source regex or function name based breakpoint. Doing it this way makes it hard to have consistent meanings for the flags in all contexts.
> If I had it to do over, I would make:
> (lldb) break set source
> (lldb) break set symbol
> (lldb) break set source-pattern
> (lldb) break set address
Of course, if I were going to do this, I'd choose names that had different initial letters, so it really wouldn't have been more onerous to type than the current setup, and it would be easy to adjust the "__regex_break" command to accommodate...
> etc... Then the flags could have the meanings appropriate to the breakpoint type, and furthermore be documented appropriately.
> I don't think we should strain the meaning of a particular flag just to keep it consistent with other orthogonal uses. We should probably start making the flag documentation specify "when used for a -n breakpoint, -f means...". I think that would be sufficient.
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
More information about the lldb-commits