File tree Expand file tree Collapse file tree 4 files changed +21
-2
lines changed Expand file tree Collapse file tree 4 files changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -234,6 +234,9 @@ class Generator final {
234234 // / Enable or disable auto generate.
235235 void SetAutoGenerate (bool b);
236236
237+ // / Return whether auto generate is enabled.
238+ bool IsAutoGenerate () const ;
239+
237240 // / Create and register a new provider.
238241 template <typename T> T *Create () {
239242 std::unique_ptr<ProviderBase> provider = std::make_unique<T>(m_root);
Original file line number Diff line number Diff line change @@ -258,6 +258,18 @@ class CommandObjectReproducerStatus : public CommandObjectParsed {
258258 result.GetOutputStream () << " Reproducer is off.\n " ;
259259 }
260260
261+ if (r.IsCapturing () || r.IsReplaying ()) {
262+ result.GetOutputStream ()
263+ << " Path: " << r.GetReproducerPath ().GetPath () << ' \n ' ;
264+ }
265+
266+ // Auto generate is hidden unless enabled because this is mostly for
267+ // development and testing.
268+ if (Generator *g = r.GetGenerator ()) {
269+ if (g->IsAutoGenerate ())
270+ result.GetOutputStream () << " Auto generate: on\n " ;
271+ }
272+
261273 result.SetStatus (eReturnStatusSuccessFinishResult);
262274 return result.Succeeded ();
263275 }
Original file line number Diff line number Diff line change @@ -205,6 +205,8 @@ void Generator::Discard() {
205205
206206void Generator::SetAutoGenerate (bool b) { m_auto_generate = b; }
207207
208+ bool Generator::IsAutoGenerate () const { return m_auto_generate; }
209+
208210const FileSpec &Generator::GetRoot () const { return m_root; }
209211
210212void Generator::AddProvidersToIndex () {
Original file line number Diff line number Diff line change 1010#
1111# RUN: %lldb --capture --capture-path %t.repro -b -o 'reproducer status' 2>&1 | FileCheck %s --check-prefix NO-WARNING --check-prefix STATUS-CAPTURE
1212# RUN: %lldb --capture -b -o 'reproducer status' 2>&1 | FileCheck %s --check-prefix NO-WARNING --check-prefix STATUS-CAPTURE
13- # RUN: %lldb --capture-path %t.repro -b -o 'reproducer status' 2>&1 | FileCheck %s --check-prefix WARNING --check-prefix STATUS-CAPTURE
13+ # RUN: %lldb --capture-path %t.repro -b -o 'reproducer status' 2>&1 | FileCheck %s --check-prefix WARNING --check-prefix STATUS-CAPTURE --check-prefix NOAUTOGEN
1414# RUN: %lldb --capture-path %t.repro -b -o 'reproducer status' --reproducer-auto-generate 2>&1 | FileCheck %s --check-prefix WARNING2
1515#
1616# NO-WARNING-NOT: warning: -capture-path specified without -capture
1717# WARNING: warning: -capture-path specified without -capture
1818# WARNING2: warning: -reproducer-auto-generate specified without -capture
1919# STATUS-CAPTURE: Reproducer is in capture mode.
20+ # NOAUTOGEN-NOT: Auto generate
2021
2122# Check auto generate.
2223# RUN: rm -rf %t.repro
23- # RUN: %lldb --capture --capture-path %t.repro -b --reproducer-auto-generate -o 'reproducer status' 2>&1 | FileCheck %s --check-prefix NO-WARNING
24+ # RUN: %lldb --capture --capture-path %t.repro -b --reproducer-auto-generate -o 'reproducer status' 2>&1 | FileCheck %s --check-prefix NO-WARNING --check-prefix AUTOGEN
2425# RUN: cat %t.repro/index.yaml
26+ # AUTOGEN: Auto generate: on
You can’t perform that action at this time.
0 commit comments