13#include "llvm/Support/FormatVariadic.h"
14#include "llvm/Support/raw_ostream.h"
27 "File a bug as a GitHub issue.",
36 return std::make_unique<GitHubReporter>();
41 llvm::raw_string_ostream os(body);
42 os <<
"### LLDB version\n" << report.
version <<
"\n\n";
43 os <<
"### Host\n" << report.
os <<
"\n\n";
45 os <<
"### Invocation\n`" << report.
invocation <<
"`\n\n";
46 os <<
"### Diagnostics\n"
48 <<
"`\nPlease attach the contents of that directory to this issue.\n";
54 while (cut > 0 && (
static_cast<unsigned char>(body[cut]) & 0xC0) == 0x80)
57 body +=
"\n\n...(truncated, see the attached diagnostics directory)";
60 std::string url = llvm::formatv(
"https://github.com/llvm/llvm-project/issues/"
61 "new?title={0}&body={1}&labels=lldb",
static constexpr size_t g_max_body_size
#define LLDB_PLUGIN_DEFINE(PluginName)
Opens a pre-filled github.com/llvm/llvm-project "new issue" page.
static llvm::StringRef GetPluginNameStatic()
llvm::Error File(const Diagnostics::Report &report) override
static std::unique_ptr< BugReporter > CreateInstance()
static llvm::Error OpenURL(llvm::StringRef url)
Open a URL with the host's default handler (Launch Services on macOS, xdg-open on other Unix).
static std::string URLEncode(llvm::StringRef str)
Percent-encode a string for use in a URL query component, per RFC 3986 (alphanumerics and "-_....
static bool RegisterPlugin(llvm::StringRef name, llvm::StringRef description, ABICreateInstance create_callback)
static bool UnregisterPlugin(ABICreateInstance create_callback)
A class that represents a running process on the host machine.
The state a triager needs to make sense of a bug report.