[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:50 PDT 2020


jingham added a comment.

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

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.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74136/new/

https://reviews.llvm.org/D74136





More information about the lldb-commits mailing list