File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed
test/API/functionalities/completion Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -289,6 +289,22 @@ class CommandObjectFrameSelect : public CommandObjectParsed {
289
289
290
290
~CommandObjectFrameSelect () override = default ;
291
291
292
+ void
293
+ HandleArgumentCompletion (CompletionRequest &request,
294
+ OptionElementVector &opt_element_vector) override {
295
+ if (!m_exe_ctx.HasProcessScope () || request.GetCursorIndex () != 0 )
296
+ return ;
297
+
298
+ lldb::ThreadSP thread_sp = m_exe_ctx.GetThreadSP ();
299
+ const uint32_t frame_num = thread_sp->GetStackFrameCount ();
300
+ for (uint32_t i = 0 ; i < frame_num; ++i) {
301
+ lldb::StackFrameSP frame_sp = thread_sp->GetStackFrameAtIndex (i);
302
+ StreamString strm;
303
+ frame_sp->Dump (&strm, false , true );
304
+ request.TryCompleteCurrentArg (std::to_string (i), strm.GetString ());
305
+ }
306
+ }
307
+
292
308
Options *GetOptions () override { return &m_options; }
293
309
294
310
protected:
Original file line number Diff line number Diff line change @@ -415,6 +415,13 @@ def test_completion_description_command_options(self):
415
415
self .check_completion_with_desc ("breakpoint set --Z" , [
416
416
])
417
417
418
+ def test_frame_select (self ):
419
+ self .build ()
420
+ self .main_source_spec = lldb .SBFileSpec ("main.cpp" )
421
+ lldbutil .run_to_source_breakpoint (self , '// Break here' , self .main_source_spec )
422
+
423
+ self .complete_from_to ('frame select ' , ['0' ])
424
+
418
425
@expectedFailureAll (oslist = ["windows" ], bugnumber = "llvm.org/pr24489" )
419
426
def test_symbol_name (self ):
420
427
self .build ()
You can’t perform that action at this time.
0 commit comments