- A new common completion CommandCompletions::Breakpoints to provide a list of the breakpoints of the current context;
- Apply the completion above to the commands breakpoint enable/disable/delete/modify;
- Unit test.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
A few small comments but this is looking pretty good to me.
lldb/source/Commands/CommandCompletions.cpp | ||
---|---|---|
558 | GetSelectedTarget() returns a TargetSP. It seems like all the operations below can be performed on the shared pointer. I think if you change this line you don't even need to change anything below. TargetSP target = interpreter.GetDebugger().GetSelectedTarget(); | |
lldb/test/API/functionalities/completion/TestCompletion.py | ||
486 | nit: missing period | |
497 | It might be nice to split this up into self.assertTrue(bp) and self.assertEqual(bp.GetNumLocations(), 1). That way the error message will be a bit more informative if either fails. The same applies to bp2 below. |
Thank you for your advice Jonas.
Btw, I also modified the raw Breakpoint pointer to be a BreakpointSP.
But I don't really understand your meaning of the comment "nit: missing period".
This is great, but you can also specify breakpoints by name. Should be possible to also complete on the list of breakpoint names.
GetSelectedTarget() returns a TargetSP. It seems like all the operations below can be performed on the shared pointer.
I think if you change this line you don't even need to change anything below.