cros_build_lib: Add strict to GetBoard()

Exits with an error message when the board is not specified and a
default board does not exist when strict is true.

BUG=chromium:968169
TEST=manual

Change-Id: I072c5b55b7204582c97a847f5c5da2a1ec728205
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/1718831
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Ben Pastene <bpastene@chromium.org>
Reviewed-by: Achuith Bhandarkar <achuith@chromium.org>
Commit-Queue: Eashan Bhatt <eashanbhatt@google.com>
Tested-by: Eashan Bhatt <eashanbhatt@google.com>
diff --git a/scripts/cros_gdb.py b/scripts/cros_gdb.py
index 8e63221..b1edc13 100644
--- a/scripts/cros_gdb.py
+++ b/scripts/cros_gdb.py
@@ -174,7 +174,8 @@
     if not self.board:
       if self.remote:
         self.board = cros_build_lib.GetBoard(device_board=device.board,
-                                             override_board=self.board)
+                                             override_board=self.board,
+                                             strict=True)
       else:
         raise GdbCannotDetectBoardError('Cannot determine which board to use. '
                                         'Please specify the with --board flag.')