@@ -290,19 +290,19 @@ bool Debugger::GetAutoConfirm() const {
290290 idx, g_debugger_properties[idx].default_uint_value != 0 );
291291}
292292
293- const FormatEntity::Entry * Debugger::GetDisassemblyFormat () const {
293+ FormatEntity::Entry Debugger::GetDisassemblyFormat () const {
294294 constexpr uint32_t idx = ePropertyDisassemblyFormat;
295- return GetPropertyAtIndexAs<const FormatEntity::Entry * >(idx);
295+ return GetPropertyAtIndexAs<FormatEntity::Entry>(idx, {} );
296296}
297297
298- const FormatEntity::Entry * Debugger::GetFrameFormat () const {
298+ FormatEntity::Entry Debugger::GetFrameFormat () const {
299299 constexpr uint32_t idx = ePropertyFrameFormat;
300- return GetPropertyAtIndexAs<const FormatEntity::Entry * >(idx);
300+ return GetPropertyAtIndexAs<FormatEntity::Entry>(idx, {} );
301301}
302302
303- const FormatEntity::Entry * Debugger::GetFrameFormatUnique () const {
303+ FormatEntity::Entry Debugger::GetFrameFormatUnique () const {
304304 constexpr uint32_t idx = ePropertyFrameFormatUnique;
305- return GetPropertyAtIndexAs<const FormatEntity::Entry * >(idx);
305+ return GetPropertyAtIndexAs<FormatEntity::Entry>(idx, {} );
306306}
307307
308308uint64_t Debugger::GetStopDisassemblyMaxSize () const {
@@ -346,14 +346,14 @@ void Debugger::SetPrompt(llvm::StringRef p) {
346346 GetCommandInterpreter ().UpdatePrompt (new_prompt);
347347}
348348
349- const FormatEntity::Entry * Debugger::GetThreadFormat () const {
349+ FormatEntity::Entry Debugger::GetThreadFormat () const {
350350 constexpr uint32_t idx = ePropertyThreadFormat;
351- return GetPropertyAtIndexAs<const FormatEntity::Entry * >(idx);
351+ return GetPropertyAtIndexAs<FormatEntity::Entry>(idx, {} );
352352}
353353
354- const FormatEntity::Entry * Debugger::GetThreadStopFormat () const {
354+ FormatEntity::Entry Debugger::GetThreadStopFormat () const {
355355 constexpr uint32_t idx = ePropertyThreadStopFormat;
356- return GetPropertyAtIndexAs<const FormatEntity::Entry * >(idx);
356+ return GetPropertyAtIndexAs<FormatEntity::Entry>(idx, {} );
357357}
358358
359359lldb::ScriptLanguage Debugger::GetScriptLanguage () const {
@@ -480,9 +480,9 @@ bool Debugger::GetShowStatusline() const {
480480 idx, g_debugger_properties[idx].default_uint_value != 0 );
481481}
482482
483- const FormatEntity::Entry * Debugger::GetStatuslineFormat () const {
483+ FormatEntity::Entry Debugger::GetStatuslineFormat () const {
484484 constexpr uint32_t idx = ePropertyStatuslineFormat;
485- return GetPropertyAtIndexAs<const FormatEntity::Entry * >(idx);
485+ return GetPropertyAtIndexAs<FormatEntity::Entry>(idx, {} );
486486}
487487
488488llvm::StringRef Debugger::GetSeparator () const {
@@ -498,6 +498,13 @@ bool Debugger::SetSeparator(llvm::StringRef s) {
498498 return ret;
499499}
500500
501+ bool Debugger::SetStatuslineFormat (const FormatEntity::Entry &format) {
502+ constexpr uint32_t idx = ePropertyStatuslineFormat;
503+ bool ret = SetPropertyAtIndex (idx, format);
504+ RedrawStatusline ();
505+ return ret;
506+ }
507+
501508bool Debugger::GetUseAutosuggestion () const {
502509 const uint32_t idx = ePropertyShowAutosuggestion;
503510 return GetPropertyAtIndexAs<bool >(
@@ -1532,8 +1539,11 @@ bool Debugger::FormatDisassemblerAddress(const FormatEntity::Entry *format,
15321539 FormatEntity::Entry format_entry;
15331540
15341541 if (format == nullptr ) {
1535- if (exe_ctx != nullptr && exe_ctx->HasTargetScope ())
1536- format = exe_ctx->GetTargetRef ().GetDebugger ().GetDisassemblyFormat ();
1542+ if (exe_ctx != nullptr && exe_ctx->HasTargetScope ()) {
1543+ format_entry =
1544+ exe_ctx->GetTargetRef ().GetDebugger ().GetDisassemblyFormat ();
1545+ format = &format_entry;
1546+ }
15371547 if (format == nullptr ) {
15381548 FormatEntity::Parse (" ${addr}: " , format_entry);
15391549 format = &format_entry;
0 commit comments