Skip to content

Commit e665d95

Browse files
authored
[lldb] Highlight basenames in backtraces (#137301)
Also changes the PC value color so it doesn't visually clash with the function names Before: <img width="1510" alt="Screenshot 2025-04-25 at 10 38 58 AM" src="https://github.com/user-attachments/assets/1ec35ba3-a3d9-4e5b-bac9-fc738bfe6d25" /> After: ![Screenshot 2025-04-25 at 4 34 27 PM](https://github.com/user-attachments/assets/3de6e778-ff97-4f47-b361-360e4bbfaede)
1 parent fcb1a48 commit e665d95

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lldb/source/Core/CoreProperties.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ let Definition = "debugger" in {
5959
Desc<"The default disassembly format string to use when disassembling instruction sequences.">;
6060
def FrameFormat: Property<"frame-format", "FormatEntity">,
6161
Global,
62-
DefaultStringValue<"frame #${frame.index}: ${ansi.fg.yellow}${frame.pc}${ansi.normal}{ ${module.file.basename}{`${function.name-with-args}{${frame.no-debug}${function.pc-offset}}}}{ at ${ansi.fg.cyan}${line.file.basename}${ansi.normal}:${ansi.fg.yellow}${line.number}${ansi.normal}{:${ansi.fg.yellow}${line.column}${ansi.normal}}}{${function.is-optimized} [opt]}{${frame.is-artificial} [artificial]}\\\\n">,
62+
DefaultStringValue<"frame #${frame.index}: ${ansi.fg.cyan}${frame.pc}${ansi.normal}{ ${module.file.basename}{`${function.name-with-args}{${frame.no-debug}${function.pc-offset}}}}{ at ${ansi.fg.cyan}${line.file.basename}${ansi.normal}:${ansi.fg.yellow}${line.number}${ansi.normal}{:${ansi.fg.yellow}${line.column}${ansi.normal}}}{${function.is-optimized} [opt]}{${frame.is-artificial} [artificial]}\\\\n">,
6363
Desc<"The default frame format string to use when displaying stack frame information for threads.">;
6464
def NotiftVoid: Property<"notify-void", "Boolean">,
6565
Global,
@@ -217,7 +217,7 @@ let Definition = "debugger" in {
217217
Desc<"If true, LLDB will automatically escape non-printable and escape characters when formatting strings.">;
218218
def FrameFormatUnique: Property<"frame-format-unique", "FormatEntity">,
219219
Global,
220-
DefaultStringValue<"frame #${frame.index}: ${ansi.fg.yellow}${frame.pc}${ansi.normal}{ ${module.file.basename}{`${function.name-without-args}{${frame.no-debug}${function.pc-offset}}}}{ at ${ansi.fg.cyan}${line.file.basename}${ansi.normal}:${ansi.fg.yellow}${line.number}${ansi.normal}{:${ansi.fg.yellow}${line.column}${ansi.normal}}}{${function.is-optimized} [opt]}{${frame.is-artificial} [artificial]}\\\\n">,
220+
DefaultStringValue<"frame #${frame.index}: ${ansi.fg.cyan}${frame.pc}${ansi.normal}{ ${module.file.basename}{`${function.name-without-args}{${frame.no-debug}${function.pc-offset}}}}{ at ${ansi.fg.cyan}${line.file.basename}${ansi.normal}:${ansi.fg.yellow}${line.number}${ansi.normal}{:${ansi.fg.yellow}${line.column}${ansi.normal}}}{${function.is-optimized} [opt]}{${frame.is-artificial} [artificial]}\\\\n">,
221221
Desc<"The default frame format string to use when displaying stack frame information for threads from thread backtrace unique.">;
222222
def ShowAutosuggestion: Property<"show-autosuggestion", "Boolean">,
223223
Global,

lldb/source/Plugins/Language/CPlusPlus/LanguageCPlusPlusProperties.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ include "../../../../include/lldb/Core/PropertiesBase.td"
33
let Definition = "language_cplusplus" in {
44
def FunctionNameFormat: Property<"function-name-format", "FormatEntity">,
55
Global,
6-
DefaultStringValue<"${function.return-left}${function.scope}${function.basename}${function.template-arguments}${function.formatted-arguments}${function.return-right}${function.qualifiers}">,
6+
DefaultStringValue<"${function.return-left}${function.scope}${ansi.fg.yellow}${function.basename}${ansi.normal}${function.template-arguments}${function.formatted-arguments}${function.return-right}${function.qualifiers}">,
77
Desc<"C++ specific frame format string to use when displaying stack frame information for threads.">;
88
}

0 commit comments

Comments
 (0)