Skip to content

Commit 70599d7

Browse files
committed
[lldb] Remove LLDB reproducers
This patch removes the remaining reproducer code. The SBReproducer class remains for ABI stability but is just an empty shell. This completes the removal process outlined on the mailing list [1]. [1] https://lists.llvm.org/pipermail/lldb-dev/2021-September/017045.html
1 parent 2e8817b commit 70599d7

File tree

102 files changed

+57
-3218
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+57
-3218
lines changed

lldb/include/lldb/API/SBReproducer.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@ class LLDB_API SBReplayOptions {
3232

3333
void SetCheckVersion(bool check);
3434
bool GetCheckVersion() const;
35-
36-
private:
37-
std::unique_ptr<lldb_private::repro::ReplayOptions> m_opaque_up;
3835
};
3936

4037
/// The SBReproducer class is special because it bootstraps the capture and

lldb/include/lldb/Core/Debugger.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -152,11 +152,7 @@ class Debugger : public std::enable_shared_from_this<Debugger>,
152152

153153
Status SetInputString(const char *data);
154154

155-
// This method will setup data recorder if reproducer enabled.
156-
// On reply mode this method should take instructions from reproducer file.
157-
Status SetInputFile(lldb::FileSP file);
158-
159-
void SetInputFile(lldb::FileSP file, repro::DataRecorder *recorder);
155+
void SetInputFile(lldb::FileSP file);
160156

161157
void SetOutputFile(lldb::FileSP file);
162158

@@ -294,8 +290,6 @@ class Debugger : public std::enable_shared_from_this<Debugger>,
294290
void SetPrompt(llvm::StringRef p);
295291
void SetPrompt(const char *) = delete;
296292

297-
llvm::StringRef GetReproducerPath() const;
298-
299293
bool GetUseExternalEditor() const;
300294

301295
bool SetUseExternalEditor(bool use_external_editor_p);

lldb/include/lldb/Core/IOHandler.h

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@
3131

3232
namespace lldb_private {
3333
class Debugger;
34-
namespace repro {
35-
class DataRecorder;
36-
}
3734
} // namespace lldb_private
3835

3936
namespace curses {
@@ -63,8 +60,7 @@ class IOHandler {
6360

6461
IOHandler(Debugger &debugger, IOHandler::Type type,
6562
const lldb::FileSP &input_sp, const lldb::StreamFileSP &output_sp,
66-
const lldb::StreamFileSP &error_sp, uint32_t flags,
67-
repro::DataRecorder *data_recorder);
63+
const lldb::StreamFileSP &error_sp, uint32_t flags);
6864

6965
virtual ~IOHandler();
7066

@@ -173,7 +169,6 @@ class IOHandler {
173169
lldb::StreamFileSP m_output_sp;
174170
lldb::StreamFileSP m_error_sp;
175171
std::recursive_mutex m_output_mutex;
176-
repro::DataRecorder *m_data_recorder;
177172
Predicate<bool> m_popped;
178173
Flags m_flags;
179174
Type m_type;
@@ -338,8 +333,7 @@ class IOHandlerEditline : public IOHandler {
338333
uint32_t line_number_start, // If non-zero show line numbers
339334
// starting at
340335
// 'line_number_start'
341-
IOHandlerDelegate &delegate,
342-
repro::DataRecorder *data_recorder);
336+
IOHandlerDelegate &delegate);
343337

344338
IOHandlerEditline(Debugger &debugger, IOHandler::Type type,
345339
const lldb::FileSP &input_sp,
@@ -351,8 +345,7 @@ class IOHandlerEditline : public IOHandler {
351345
uint32_t line_number_start, // If non-zero show line numbers
352346
// starting at
353347
// 'line_number_start'
354-
IOHandlerDelegate &delegate,
355-
repro::DataRecorder *data_recorder);
348+
IOHandlerDelegate &delegate);
356349

357350
IOHandlerEditline(Debugger &, IOHandler::Type, const char *, const char *,
358351
const char *, bool, bool, uint32_t,

lldb/include/lldb/Interpreter/CommandOptionArgumentTable.h

Lines changed: 0 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -124,67 +124,6 @@ static constexpr OptionEnumValueElement g_log_handler_type[] = {
124124
},
125125
};
126126

127-
static constexpr OptionEnumValueElement g_reproducer_provider_type[] = {
128-
{
129-
eReproducerProviderCommands,
130-
"commands",
131-
"Command Interpreter Commands",
132-
},
133-
{
134-
eReproducerProviderFiles,
135-
"files",
136-
"Files",
137-
},
138-
{
139-
eReproducerProviderSymbolFiles,
140-
"symbol-files",
141-
"Symbol Files",
142-
},
143-
{
144-
eReproducerProviderGDB,
145-
"gdb",
146-
"GDB Remote Packets",
147-
},
148-
{
149-
eReproducerProviderProcessInfo,
150-
"processes",
151-
"Process Info",
152-
},
153-
{
154-
eReproducerProviderVersion,
155-
"version",
156-
"Version",
157-
},
158-
{
159-
eReproducerProviderWorkingDirectory,
160-
"cwd",
161-
"Working Directory",
162-
},
163-
{
164-
eReproducerProviderHomeDirectory,
165-
"home",
166-
"Home Directory",
167-
},
168-
{
169-
eReproducerProviderNone,
170-
"none",
171-
"None",
172-
},
173-
};
174-
175-
static constexpr OptionEnumValueElement g_reproducer_signaltype[] = {
176-
{
177-
eReproducerCrashSigill,
178-
"SIGILL",
179-
"Illegal instruction",
180-
},
181-
{
182-
eReproducerCrashSigsegv,
183-
"SIGSEGV",
184-
"Segmentation fault",
185-
},
186-
};
187-
188127
static constexpr OptionEnumValueElement g_script_synchro_type[] = {
189128
{
190129
eScriptedCommandSynchronicitySynchronous,
@@ -318,8 +257,6 @@ static constexpr CommandObject::ArgumentTableEntry g_argument_table[] = {
318257
{ lldb::eArgTypeConnectURL, "process-connect-url", CommandCompletions::eNoCompletion, {}, { nullptr, false }, "A URL-style specification for a remote connection." },
319258
{ lldb::eArgTypeTargetID, "target-id", CommandCompletions::eNoCompletion, {}, { nullptr, false }, "The index ID for an lldb Target." },
320259
{ lldb::eArgTypeStopHookID, "stop-hook-id", CommandCompletions::eNoCompletion, {}, { nullptr, false }, "The ID you receive when you create a stop-hook." },
321-
{ lldb::eArgTypeReproducerProvider, "reproducer-provider", CommandCompletions::eNoCompletion, g_reproducer_provider_type, { nullptr, false }, "The reproducer provider." },
322-
{ lldb::eArgTypeReproducerSignal, "reproducer-signal", CommandCompletions::eNoCompletion, g_reproducer_signaltype, { nullptr, false }, "The signal used to emulate a reproducer crash." },
323260
// clang-format on
324261
};
325262

lldb/include/lldb/Utility/ArchSpec.h

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
#include "lldb/lldb-private-enumerations.h"
1717
#include "llvm/ADT/StringRef.h"
1818
#include "llvm/ADT/Triple.h"
19-
#include "llvm/Support/YAMLTraits.h"
2019
#include <cstddef>
2120
#include <cstdint>
2221
#include <string>
@@ -568,16 +567,4 @@ bool ParseMachCPUDashSubtypeTriple(llvm::StringRef triple_str, ArchSpec &arch);
568567

569568
} // namespace lldb_private
570569

571-
namespace llvm {
572-
namespace yaml {
573-
template <> struct ScalarTraits<lldb_private::ArchSpec> {
574-
static void output(const lldb_private::ArchSpec &, void *, raw_ostream &);
575-
static StringRef input(StringRef, void *, lldb_private::ArchSpec &);
576-
static QuotingType mustQuote(StringRef S) { return QuotingType::Double; }
577-
};
578-
} // namespace yaml
579-
} // namespace llvm
580-
581-
LLVM_YAML_IS_SEQUENCE_VECTOR(lldb_private::ArchSpec)
582-
583570
#endif // LLDB_UTILITY_ARCHSPEC_H

lldb/include/lldb/Utility/Args.h

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ class Args {
3535
struct ArgEntry {
3636
private:
3737
friend class Args;
38-
friend struct llvm::yaml::MappingTraits<Args>;
39-
friend struct llvm::yaml::MappingTraits<Args::ArgEntry>;
4038

4139
std::unique_ptr<char[]> ptr;
4240
char quote = '\0';
@@ -287,8 +285,6 @@ class Args {
287285
char quote_char);
288286

289287
private:
290-
friend struct llvm::yaml::MappingTraits<Args>;
291-
292288
std::vector<ArgEntry> m_entries;
293289
/// The arguments as C strings with a trailing nullptr element.
294290
///
@@ -383,28 +379,4 @@ class OptionsWithRaw {
383379

384380
} // namespace lldb_private
385381

386-
namespace llvm {
387-
namespace yaml {
388-
template <> struct MappingTraits<lldb_private::Args::ArgEntry> {
389-
class NormalizedArgEntry {
390-
public:
391-
NormalizedArgEntry(IO &) {}
392-
NormalizedArgEntry(IO &, lldb_private::Args::ArgEntry &entry)
393-
: value(entry.ref()), quote(entry.quote) {}
394-
lldb_private::Args::ArgEntry denormalize(IO &) {
395-
return lldb_private::Args::ArgEntry(value, quote);
396-
}
397-
StringRef value;
398-
uint8_t quote = '\0';
399-
};
400-
static void mapping(IO &io, lldb_private::Args::ArgEntry &v);
401-
};
402-
template <> struct MappingTraits<lldb_private::Args> {
403-
static void mapping(IO &io, lldb_private::Args &v);
404-
};
405-
} // namespace yaml
406-
} // namespace llvm
407-
408-
LLVM_YAML_IS_SEQUENCE_VECTOR(lldb_private::Args::ArgEntry)
409-
410382
#endif // LLDB_UTILITY_ARGS_H

lldb/include/lldb/Utility/ConstString.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#include "llvm/ADT/DenseMapInfo.h"
1313
#include "llvm/ADT/StringRef.h"
1414
#include "llvm/Support/FormatVariadic.h"
15-
#include "llvm/Support/YAMLTraits.h"
1615

1716
#include <cstddef>
1817

@@ -450,20 +449,10 @@ template <> struct DenseMapInfo<lldb_private::ConstString> {
450449
};
451450
/// \}
452451

453-
namespace yaml {
454-
template <> struct ScalarTraits<lldb_private::ConstString> {
455-
static void output(const lldb_private::ConstString &, void *, raw_ostream &);
456-
static StringRef input(StringRef, void *, lldb_private::ConstString &);
457-
static QuotingType mustQuote(StringRef S) { return QuotingType::Double; }
458-
};
459-
} // namespace yaml
460-
461452
inline raw_ostream &operator<<(raw_ostream &os, lldb_private::ConstString s) {
462453
os << s.GetStringRef();
463454
return os;
464455
}
465456
} // namespace llvm
466457

467-
LLVM_YAML_IS_SEQUENCE_VECTOR(lldb_private::ConstString)
468-
469458
#endif // LLDB_UTILITY_CONSTSTRING_H

lldb/include/lldb/Utility/FileSpec.h

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
#include "llvm/Support/FileSystem.h"
1919
#include "llvm/Support/FormatVariadic.h"
2020
#include "llvm/Support/Path.h"
21-
#include "llvm/Support/YAMLTraits.h"
2221

2322
#include <cstddef>
2423
#include <cstdint>
@@ -411,8 +410,6 @@ class FileSpec {
411410
ConstString GetLastPathComponent() const;
412411

413412
protected:
414-
friend struct llvm::yaml::MappingTraits<FileSpec>;
415-
416413
// Convenience method for setting the file without changing the style.
417414
void SetFile(llvm::StringRef path);
418415

@@ -439,9 +436,6 @@ class FileSpec {
439436

440437
/// Dump a FileSpec object to a stream
441438
Stream &operator<<(Stream &s, const FileSpec &f);
442-
443-
/// Prevent ODR violations with traits for llvm::sys::path::Style.
444-
LLVM_YAML_STRONG_TYPEDEF(FileSpec::Style, FileSpecStyle)
445439
} // namespace lldb_private
446440

447441
namespace llvm {
@@ -469,15 +463,6 @@ template <> struct format_provider<lldb_private::FileSpec> {
469463
StringRef Style);
470464
};
471465

472-
namespace yaml {
473-
template <> struct ScalarEnumerationTraits<lldb_private::FileSpecStyle> {
474-
static void enumeration(IO &io, lldb_private::FileSpecStyle &style);
475-
};
476-
477-
template <> struct MappingTraits<lldb_private::FileSpec> {
478-
static void mapping(IO &io, lldb_private::FileSpec &f);
479-
};
480-
} // namespace yaml
481466
} // namespace llvm
482467

483468
#endif // LLDB_UTILITY_FILESPEC_H

0 commit comments

Comments
 (0)