cros_fuzz: Copy gdbserver to /build/<board>

gdbserver is needed to be able to run gdb on fuzzers.

BUG=chromium:933882
BUG=chromium:930550

TEST=gdbserver is copied to /build/amd64-generic with cros_fuzz.

Change-Id: Ibf429ce3a8a938723265c548548ac419db4dd9a3
Reviewed-on: https://chromium-review.googlesource.com/1479073
Commit-Ready: Manoj Gupta <manojgupta@chromium.org>
Tested-by: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
diff --git a/scripts/cros_fuzz.py b/scripts/cros_fuzz.py
index d37223a..d40df88 100644
--- a/scripts/cros_fuzz.py
+++ b/scripts/cros_fuzz.py
@@ -784,7 +784,7 @@
   ASAN_SYMBOLIZE_PATH = os.path.join('/', 'usr', 'bin', 'asan_symbolize.py')
 
   # List of LLVM binaries we must install in sysroot.
-  LLVM_BINARY_NAMES = ['llvm-symbolizer', 'llvm-profdata']
+  LLVM_BINARY_NAMES = ['gdbserver', 'llvm-symbolizer', 'llvm-profdata']
 
   def __init__(self):
     self.asan_symbolize_sysroot_path = GetSysrootPath(self.ASAN_SYMBOLIZE_PATH)
@@ -844,6 +844,13 @@
     # the sysroot.
     binary_rel_path = ['usr', 'bin', self.binary]
     binary_chroot_path = os.path.join('/', *binary_rel_path)
+    if not os.path.exists(binary_chroot_path):
+      logging.warning('Cannot copy %s, file does not exist in chroot.',
+                      binary_chroot_path)
+      logging.warning('Functionality provided by %s will be missing.',
+                      binary_chroot_path)
+      return
+
     osutils.SafeMakedirsNonRoot(self.install_dir)
 
     # Copy the binary and everything needed to run it into the sysroot.