[Lldb-commits] [lldb] [lldb-dap] Add an option to provide a format for stack frames (PR #71843)

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Sat Nov 11 10:55:28 PST 2023


================
@@ -193,6 +193,27 @@ class LLDB_API SBFrame {
 
   bool GetDescription(lldb::SBStream &description);
 
+  /// Similar to \a GetDescription() but the format of the description can be
+  /// configured via the \p format parameter. See
+  /// https://lldb.llvm.org/use/formatting.html for more information on format
+  /// strings.
+  ///
+  /// \param[in] format
+  ///   The format to use for generating the description.
+  ///
+  /// \param[out] output
+  ///   The stream where the description will be written to.
+  ///
+  /// \param[in] default_value
+  ///   If the description couldn't be generated, and this parameter is not
+  ///   null, it will be printed to the \p output stream. This doesn't affect
+  ///   the return value of this method.
----------------
clayborg wrote:

Do we need this parameter? If we return `false`, then the user can do what ever they need to. Not sure how to provide a good `default_value` for a frame that makes any sense as it can't be hard coded, and we don't want to generate a frame string before calling this just so we can use it as the default_value? I would prefer to remove this paramter and fix any call sites to do some other logging if false is returned

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


More information about the lldb-commits mailing list