@@ -507,6 +507,48 @@ class CommandObjectSettingsList : public CommandObjectParsed {
507507 }
508508};
509509
510+ // CommandObjectSettingsModified -- List modified variables
511+
512+ class CommandObjectSettingsModified : public CommandObjectParsed {
513+ public:
514+ CommandObjectSettingsModified (CommandInterpreter &interpreter)
515+ : CommandObjectParsed(interpreter, " settings modified" ,
516+ " List modified debugger settings." ) {}
517+
518+ ~CommandObjectSettingsModified () override = default ;
519+
520+ protected:
521+ void HandleProperties (OptionValueProperties *properties, Stream &strm) {
522+ if (!properties)
523+ return ;
524+
525+ for (const auto &property : *properties) {
526+ auto value_sp = property.GetValue ();
527+ if (!value_sp)
528+ continue ;
529+
530+ if (auto *subproperties = value_sp->GetAsProperties ()) {
531+ HandleProperties (subproperties, strm);
532+ continue ;
533+ }
534+
535+ if (value_sp->OptionWasSet ()) {
536+ property.DumpQualifiedName (strm);
537+ strm.PutCString (" = " );
538+ value_sp->DumpValue (&m_exe_ctx, strm, OptionValue::eDumpOptionValue);
539+ strm.EOL ();
540+ }
541+ }
542+ }
543+
544+ void DoExecute (Args &args, CommandReturnObject &result) override {
545+ result.SetStatus (eReturnStatusSuccessFinishResult);
546+
547+ if (auto properties_sp = GetDebugger ().GetValueProperties ())
548+ HandleProperties (properties_sp.get (), result.GetOutputStream ());
549+ }
550+ };
551+
510552// CommandObjectSettingsRemove
511553
512554class CommandObjectSettingsRemove : public CommandObjectRaw {
@@ -1070,6 +1112,8 @@ CommandObjectMultiwordSettings::CommandObjectMultiwordSettings(
10701112 CommandObjectSP (new CommandObjectSettingsShow (interpreter)));
10711113 LoadSubCommand (" list" ,
10721114 CommandObjectSP (new CommandObjectSettingsList (interpreter)));
1115+ LoadSubCommand (" modified" , CommandObjectSP (new CommandObjectSettingsModified (
1116+ interpreter)));
10731117 LoadSubCommand (" remove" ,
10741118 CommandObjectSP (new CommandObjectSettingsRemove (interpreter)));
10751119 LoadSubCommand (" replace" , CommandObjectSP (
0 commit comments