Remove CompilerDriver::IsDebuggingSupported

Change-Id: Ib67e3ef67462fe5dae81148f7fe8cc76b3887f11
diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc
index f1082db..6558f8a 100644
--- a/compiler/driver/compiler_driver.cc
+++ b/compiler/driver/compiler_driver.cc
@@ -335,8 +335,7 @@
 
 CompilerDriver::CompilerDriver(CompilerBackend compiler_backend, InstructionSet instruction_set,
                                bool image, DescriptorSet* image_classes,
-                               size_t thread_count, bool support_debugging,
-                               bool dump_stats, bool dump_timings)
+                               size_t thread_count, bool dump_stats, bool dump_timings)
     : compiler_backend_(compiler_backend),
       instruction_set_(instruction_set),
       freezing_constructor_lock_("freezing constructor lock"),
@@ -345,7 +344,6 @@
       image_(image),
       image_classes_(image_classes),
       thread_count_(thread_count),
-      support_debugging_(support_debugging),
       start_ns_(0),
       stats_(new AOTCompilationStats),
       dump_stats_(dump_stats),
diff --git a/compiler/driver/compiler_driver.h b/compiler/driver/compiler_driver.h
index 80cc89b..902fda7 100644
--- a/compiler/driver/compiler_driver.h
+++ b/compiler/driver/compiler_driver.h
@@ -72,8 +72,7 @@
   // classes.
   explicit CompilerDriver(CompilerBackend compiler_backend, InstructionSet instruction_set,
                           bool image, DescriptorSet* image_classes,
-                          size_t thread_count, bool support_debugging,
-                          bool dump_stats, bool dump_timings);
+                          size_t thread_count, bool dump_stats, bool dump_timings);
 
   ~CompilerDriver();
 
@@ -84,10 +83,6 @@
   void CompileOne(const mirror::AbstractMethod* method)
       SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
 
-  bool IsDebuggingSupported() {
-    return support_debugging_;
-  }
-
   InstructionSet GetInstructionSet() const {
     return instruction_set_;
   }
@@ -362,7 +357,6 @@
   UniquePtr<DescriptorSet> image_classes_;
 
   size_t thread_count_;
-  bool support_debugging_;
   uint64_t start_ns_;
 
   UniquePtr<AOTCompilationStats> stats_;
diff --git a/dex2oat/dex2oat.cc b/dex2oat/dex2oat.cc
index 9e23d3e..75e1afe 100644
--- a/dex2oat/dex2oat.cc
+++ b/dex2oat/dex2oat.cc
@@ -149,14 +149,13 @@
 class Dex2Oat {
  public:
   static bool Create(Dex2Oat** p_dex2oat, Runtime::Options& options, CompilerBackend compiler_backend,
-                     InstructionSet instruction_set, size_t thread_count, bool support_debugging)
+                     InstructionSet instruction_set, size_t thread_count)
       SHARED_TRYLOCK_FUNCTION(true, Locks::mutator_lock_) {
     if (!CreateRuntime(options, instruction_set)) {
       *p_dex2oat = NULL;
       return false;
     }
-    *p_dex2oat = new Dex2Oat(Runtime::Current(), compiler_backend, instruction_set, thread_count,
-                             support_debugging);
+    *p_dex2oat = new Dex2Oat(Runtime::Current(), compiler_backend, instruction_set, thread_count);
     return true;
   }
 
@@ -249,7 +248,6 @@
                                                         image,
                                                         image_classes.release(),
                                                         thread_count_,
-                                                        support_debugging_,
                                                         dump_stats,
                                                         dump_timings));
 
@@ -336,12 +334,11 @@
 
  private:
   explicit Dex2Oat(Runtime* runtime, CompilerBackend compiler_backend, InstructionSet instruction_set,
-                   size_t thread_count, bool support_debugging)
+                   size_t thread_count)
       : compiler_backend_(compiler_backend),
         instruction_set_(instruction_set),
         runtime_(runtime),
         thread_count_(thread_count),
-        support_debugging_(support_debugging),
         start_ns_(NanoTime()) {
   }
 
@@ -402,7 +399,6 @@
 
   Runtime* runtime_;
   size_t thread_count_;
-  bool support_debugging_;
   uint64_t start_ns_;
 
   DISALLOW_IMPLICIT_CONSTRUCTORS(Dex2Oat);
@@ -596,7 +592,6 @@
   std::string android_root;
   std::vector<const char*> runtime_args;
   int thread_count = sysconf(_SC_NPROCESSORS_CONF);
-  bool support_debugging = false;
 #if defined(ART_USE_PORTABLE_COMPILER)
   CompilerBackend compiler_backend = kPortable;
 #else
@@ -643,8 +638,6 @@
       if (!ParseInt(oat_fd_str, &oat_fd)) {
         Usage("could not parse --oat-fd argument '%s' as an integer", oat_fd_str);
       }
-    } else if (option == "-g") {
-      support_debugging = true;
     } else if (option == "--watch-dog") {
       watch_dog_enabled = true;
     } else if (option == "--no-watch-dog") {
@@ -866,8 +859,7 @@
 
 
   Dex2Oat* p_dex2oat;
-  if (!Dex2Oat::Create(&p_dex2oat, options, compiler_backend, instruction_set, thread_count,
-                       support_debugging)) {
+  if (!Dex2Oat::Create(&p_dex2oat, options, compiler_backend, instruction_set, thread_count)) {
     LOG(ERROR) << "Failed to create dex2oat";
     return EXIT_FAILURE;
   }
diff --git a/runtime/common_test.h b/runtime/common_test.h
index 03a45aa..13626a5 100644
--- a/runtime/common_test.h
+++ b/runtime/common_test.h
@@ -349,7 +349,7 @@
       class_linker_->FixupDexCaches(runtime_->GetResolutionMethod());
       compiler_driver_.reset(new CompilerDriver(compiler_backend, instruction_set,
                                                 true, new CompilerDriver::DescriptorSet,
-                                                2, false, true, true));
+                                                2, true, true));
     }
     // We typically don't generate an image in unit tests, disable this optimization by default.
     compiler_driver_->SetSupportBootImageFixup(false);
diff --git a/runtime/oat_test.cc b/runtime/oat_test.cc
index 70c2e9e..7f24564 100644
--- a/runtime/oat_test.cc
+++ b/runtime/oat_test.cc
@@ -74,8 +74,7 @@
 #else
   CompilerBackend compiler_backend = kQuick;
 #endif
-  compiler_driver_.reset(new CompilerDriver(compiler_backend, kThumb2, false, NULL, 2, false,
-                                            true, true));
+  compiler_driver_.reset(new CompilerDriver(compiler_backend, kThumb2, false, NULL, 2, true, true));
   jobject class_loader = NULL;
   if (compile) {
     compiler_driver_->CompileAll(class_loader, class_linker->GetBootClassPath());