[Lldb-commits] [lldb] [lldb] colorize symbols in image lookup with a regex pattern (PR #69422)

José Lira Junior via lldb-commits lldb-commits at lists.llvm.org
Tue Dec 5 05:40:20 PST 2023


================
@@ -246,8 +246,8 @@ class Address {
   /// \see Address::DumpStyle
   bool Dump(Stream *s, ExecutionContextScope *exe_scope, DumpStyle style,
             DumpStyle fallback_style = DumpStyleInvalid,
-            uint32_t addr_byte_size = UINT32_MAX,
-            bool all_ranges = false) const;
+            uint32_t addr_byte_size = UINT32_MAX, bool all_ranges = false,
+            const char *pattern = nullptr) const;
----------------
junior-jl wrote:

I apologize, I should have noted the errors. But as far as I remember, it was related to use of deleted functions and type conversions. I also tried passing the parameter as a reference thinking the error could be caused by copying. 

> Remember that optionals are "pointer like" when you want to get at the value within them, *foo, foo->method() etc. that trips me up sometimes.

Hmm, I was trying to get `pattern.value()`, perhaps that was part of the problem.

> Also the default value would be  = std::nullopt

At least I got that right.

https://github.com/llvm/llvm-project/pull/69422


More information about the lldb-commits mailing list