[Lldb-commits] [PATCH] D87807: [lldb/Commands] Fix outdated `breakpoint command add` help string

Jim Ingham via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Sep 16 17:00:32 PDT 2020


jingham added a comment.

LGTM, if you want to remove the last example, I say go ahead.  If you want to dig in more, then we should go through another review for the useful example.



================
Comment at: lldb/source/Commands/CommandObjectBreakpointCommand.cpp:174-181
-(lldb) breakpoint command add -s python 1
-Enter your Python command(s). Type 'DONE' to end.
-> def breakpoint_output (bp_no):
->     out_string = "Hit breakpoint number " + repr (bp_no)
->     print out_string
->     return True
-> breakpoint_output (1)
----------------
kastiglione wrote:
> Does anyone think this should be kept?
It is potentially interesting that you can put other code in this definition, so long as there's only one function defined.  Maybe you could use that to initialize something you were planning to log to (open a file or something?)  But if that's what we are showing people, we should actually describe what it's legit to do other than define a function in this input editor.  

As it is, it's overly mysterious and not very helpful.  And the example is unmotivated so it's just confusing...  

If you feel like digging into what else can go here, and come up with a motivated example that's actually useful, I think that would be handy.  But otherwise, I'm fine with deleting the last example.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D87807



More information about the lldb-commits mailing list