Skip to content

Commit d3173f4

Browse files
authored
[lldb] Remove -d(ebug) mode from the lldb driver (#83330)
The -d(ebug) option broke 5 years ago when I migrated the driver to libOption. Since then, we were never check if the option is set. We were incorrectly toggling the internal variable (m_debug_mode) based on OPT_no_use_colors instead. Given that the functionality doesn't seem particularly useful and nobody noticed it has been broken for 5 years, I'm just removing the flag.
1 parent 0f76d9f commit d3173f4

File tree

3 files changed

+0
-18
lines changed

3 files changed

+0
-18
lines changed

lldb/test/Shell/Driver/TestHelp.test

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ CHECK: --arch
3737
CHECK: -a
3838
CHECK: --core
3939
CHECK: -c
40-
CHECK: --debug
41-
CHECK: -d
4240
CHECK: --editor
4341
CHECK: -e
4442
CHECK: --file

lldb/tools/driver/Driver.cpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,6 @@ SBError Driver::ProcessArgs(const opt::InputArgList &args, bool &exiting) {
188188
if (args.hasArg(OPT_no_use_colors)) {
189189
m_debugger.SetUseColor(false);
190190
WithColor::setAutoDetectFunction(disable_color);
191-
m_option_data.m_debug_mode = true;
192191
}
193192

194193
if (args.hasArg(OPT_version)) {
@@ -455,16 +454,7 @@ int Driver::MainLoop() {
455454
// Process lldbinit files before handling any options from the command line.
456455
SBCommandReturnObject result;
457456
sb_interpreter.SourceInitFileInGlobalDirectory(result);
458-
if (m_option_data.m_debug_mode) {
459-
result.PutError(m_debugger.GetErrorFile());
460-
result.PutOutput(m_debugger.GetOutputFile());
461-
}
462-
463457
sb_interpreter.SourceInitFileInHomeDirectory(result, m_option_data.m_repl);
464-
if (m_option_data.m_debug_mode) {
465-
result.PutError(m_debugger.GetErrorFile());
466-
result.PutOutput(m_debugger.GetOutputFile());
467-
}
468458

469459
// Source the local .lldbinit file if it exists and we're allowed to source.
470460
// Here we want to always print the return object because it contains the
@@ -536,11 +526,6 @@ int Driver::MainLoop() {
536526
"or -s) are ignored in REPL mode.\n";
537527
}
538528

539-
if (m_option_data.m_debug_mode) {
540-
result.PutError(m_debugger.GetErrorFile());
541-
result.PutOutput(m_debugger.GetOutputFile());
542-
}
543-
544529
const bool handle_events = true;
545530
const bool spawn_thread = false;
546531

lldb/tools/driver/Driver.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ class Driver : public lldb::SBBroadcaster {
7575
std::vector<InitialCmdEntry> m_after_file_commands;
7676
std::vector<InitialCmdEntry> m_after_crash_commands;
7777

78-
bool m_debug_mode = false;
7978
bool m_source_quietly = false;
8079
bool m_print_version = false;
8180
bool m_print_python_path = false;

0 commit comments

Comments
 (0)