@@ -290,19 +290,19 @@ bool Debugger::GetAutoConfirm() const {
290
290
idx, g_debugger_properties[idx].default_uint_value != 0 );
291
291
}
292
292
293
- const FormatEntity::Entry * Debugger::GetDisassemblyFormat () const {
293
+ FormatEntity::Entry Debugger::GetDisassemblyFormat () const {
294
294
constexpr uint32_t idx = ePropertyDisassemblyFormat;
295
- return GetPropertyAtIndexAs<const FormatEntity::Entry * >(idx);
295
+ return GetPropertyAtIndexAs<FormatEntity::Entry>(idx, {} );
296
296
}
297
297
298
- const FormatEntity::Entry * Debugger::GetFrameFormat () const {
298
+ FormatEntity::Entry Debugger::GetFrameFormat () const {
299
299
constexpr uint32_t idx = ePropertyFrameFormat;
300
- return GetPropertyAtIndexAs<const FormatEntity::Entry * >(idx);
300
+ return GetPropertyAtIndexAs<FormatEntity::Entry>(idx, {} );
301
301
}
302
302
303
- const FormatEntity::Entry * Debugger::GetFrameFormatUnique () const {
303
+ FormatEntity::Entry Debugger::GetFrameFormatUnique () const {
304
304
constexpr uint32_t idx = ePropertyFrameFormatUnique;
305
- return GetPropertyAtIndexAs<const FormatEntity::Entry * >(idx);
305
+ return GetPropertyAtIndexAs<FormatEntity::Entry>(idx, {} );
306
306
}
307
307
308
308
uint64_t Debugger::GetStopDisassemblyMaxSize () const {
@@ -346,14 +346,14 @@ void Debugger::SetPrompt(llvm::StringRef p) {
346
346
GetCommandInterpreter ().UpdatePrompt (new_prompt);
347
347
}
348
348
349
- const FormatEntity::Entry * Debugger::GetThreadFormat () const {
349
+ FormatEntity::Entry Debugger::GetThreadFormat () const {
350
350
constexpr uint32_t idx = ePropertyThreadFormat;
351
- return GetPropertyAtIndexAs<const FormatEntity::Entry * >(idx);
351
+ return GetPropertyAtIndexAs<FormatEntity::Entry>(idx, {} );
352
352
}
353
353
354
- const FormatEntity::Entry * Debugger::GetThreadStopFormat () const {
354
+ FormatEntity::Entry Debugger::GetThreadStopFormat () const {
355
355
constexpr uint32_t idx = ePropertyThreadStopFormat;
356
- return GetPropertyAtIndexAs<const FormatEntity::Entry * >(idx);
356
+ return GetPropertyAtIndexAs<FormatEntity::Entry>(idx, {} );
357
357
}
358
358
359
359
lldb::ScriptLanguage Debugger::GetScriptLanguage () const {
@@ -480,9 +480,9 @@ bool Debugger::GetShowStatusline() const {
480
480
idx, g_debugger_properties[idx].default_uint_value != 0 );
481
481
}
482
482
483
- const FormatEntity::Entry * Debugger::GetStatuslineFormat () const {
483
+ FormatEntity::Entry Debugger::GetStatuslineFormat () const {
484
484
constexpr uint32_t idx = ePropertyStatuslineFormat;
485
- return GetPropertyAtIndexAs<const FormatEntity::Entry * >(idx);
485
+ return GetPropertyAtIndexAs<FormatEntity::Entry>(idx, {} );
486
486
}
487
487
488
488
llvm::StringRef Debugger::GetSeparator () const {
@@ -498,6 +498,13 @@ bool Debugger::SetSeparator(llvm::StringRef s) {
498
498
return ret;
499
499
}
500
500
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
+
501
508
bool Debugger::GetUseAutosuggestion () const {
502
509
const uint32_t idx = ePropertyShowAutosuggestion;
503
510
return GetPropertyAtIndexAs<bool >(
@@ -1532,8 +1539,11 @@ bool Debugger::FormatDisassemblerAddress(const FormatEntity::Entry *format,
1532
1539
FormatEntity::Entry format_entry;
1533
1540
1534
1541
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
+ }
1537
1547
if (format == nullptr ) {
1538
1548
FormatEntity::Parse (" ${addr}: " , format_entry);
1539
1549
format = &format_entry;
0 commit comments