diff options
Diffstat (limited to 'lldb/source/Breakpoint/Breakpoint.cpp')
| -rw-r--r-- | lldb/source/Breakpoint/Breakpoint.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lldb/source/Breakpoint/Breakpoint.cpp b/lldb/source/Breakpoint/Breakpoint.cpp index 337c1a4ac401..2ed0c9314e3e 100644 --- a/lldb/source/Breakpoint/Breakpoint.cpp +++ b/lldb/source/Breakpoint/Breakpoint.cpp @@ -15,6 +15,7 @@ #include "lldb/Breakpoint/BreakpointResolver.h" #include "lldb/Breakpoint/BreakpointResolverFileLine.h" #include "lldb/Core/Address.h" +#include "lldb/Core/Debugger.h" #include "lldb/Core/Module.h" #include "lldb/Core/ModuleList.h" #include "lldb/Core/SearchFilter.h" @@ -26,6 +27,7 @@ #include "lldb/Target/SectionLoadList.h" #include "lldb/Target/Target.h" #include "lldb/Target/ThreadSpec.h" +#include "lldb/Utility/AnsiTerminal.h" #include "lldb/Utility/LLDBLog.h" #include "lldb/Utility/Log.h" #include "lldb/Utility/Stream.h" @@ -838,6 +840,13 @@ void Breakpoint::GetDescription(Stream *s, lldb::DescriptionLevel level, bool show_locations) { assert(s != nullptr); + const bool dim_breakpoint_description = + !IsEnabled() && s->AsRawOstream().colors_enabled(); + if (dim_breakpoint_description) + s->Printf("%s", ansi::FormatAnsiTerminalCodes( + GetTarget().GetDebugger().GetDisabledAnsiPrefix()) + .c_str()); + if (!m_kind_description.empty()) { if (level == eDescriptionLevelBrief) { s->PutCString(GetBreakpointKind()); @@ -934,6 +943,12 @@ void Breakpoint::GetDescription(Stream *s, lldb::DescriptionLevel level, } s->IndentLess(); } + + // Reset the colors back to normal if they were previously greyed out. + if (dim_breakpoint_description) + s->Printf("%s", ansi::FormatAnsiTerminalCodes( + GetTarget().GetDebugger().GetDisabledAnsiSuffix()) + .c_str()); } void Breakpoint::GetResolverDescription(Stream *s) { |
