[Lldb-commits] [lldb] Colorize output when searching for symbols in lldb (PR #69422)
David Spickett via lldb-commits
lldb-commits at lists.llvm.org
Mon Oct 23 07:32:41 PDT 2023
================
@@ -680,21 +722,33 @@ bool Address::Dump(Stream *s, ExecutionContextScope *exe_scope, DumpStyle style,
if (show_stop_context) {
// We have a function or a symbol from the same sections as this
// address.
- sc.DumpStopContext(s, exe_scope, *this, show_fullpaths,
- show_module, show_inlined_frames,
- show_function_arguments, show_function_name);
+ // Using the same logic, hecking if searched symbol passed to this function or if it using the defualt nullptr
+ if(name)
+ sc.DumpStopContext(s, exe_scope, *this, show_fullpaths,
+ show_module, show_inlined_frames,
+ show_function_arguments, show_function_name, name);
+ else
+ sc.DumpStopContext(s, exe_scope, *this, show_fullpaths,
+ show_module, show_inlined_frames,
+ show_function_arguments, show_function_name);
} else {
// We found a symbol but it was in a different section so it
// isn't the symbol we should be showing, just show the section
// name + offset
- Dump(s, exe_scope, DumpStyleSectionNameOffset);
+ if(name)
+ Dump(s, exe_scope, DumpStyleSectionNameOffset, DumpStyleInvalid, UINT32_MAX, false, name);
+ else
+ Dump(s, exe_scope, DumpStyleSectionNameOffset);
}
}
}
}
} else {
- if (fallback_style != DumpStyleInvalid)
+ if (fallback_style != DumpStyleInvalid && !name)
return Dump(s, exe_scope, fallback_style, DumpStyleInvalid, addr_size);
+ else if(fallback_style != DumpStyleInvalid && name){
+ return Dump(s, exe_scope, fallback_style, DumpStyleInvalid, addr_size, false, name);
----------------
DavidSpickett wrote:
Here your one call would be:
```
return Dump(s, exe_scope, fallback_style, DumpStyleInvalid, addr_size, false, name);
```
Given that the previous call effectively passed `false` as well.
https://github.com/llvm/llvm-project/pull/69422
More information about the lldb-commits
mailing list