[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
Mon Nov 13 17:02:58 PST 2023


================
@@ -0,0 +1,47 @@
+//===-- SBFormat.cpp ------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "lldb/API/SBFormat.h"
+#include "Utils.h"
+#include "lldb/Core/FormatEntity.h"
+#include "lldb/lldb-types.h"
+#include <lldb/API/SBError.h>
+#include <lldb/Utility/Status.h>
+
+using namespace lldb;
+using namespace lldb_private;
+
+SBFormat::SBFormat() : m_opaque_sp() {}
----------------
clayborg wrote:

Do we want a constructor like:
```
Also do we want an actual constructor for SBFormat like:
```
SBFormat(const char *format, lldb::SBError &error);
```
Seems a pain to always have to write:
```
SBError error;
SBFormat format = SBFormat::Parse(<format>, error);
```
Versus:
```
SBFormat format(<format>, error);
```


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


More information about the lldb-commits mailing list