api: rewrite breakpad and add debug symbols

Breakpad symbols were named wrong, referring to DEBUG symbols. We
translate the existing DEBUG to BREAKPAD_DEBUG and we correct them.

In addition we intro a new model for the global Get function to call
the individual handlers. Finally, DEBUG is also implemented.

BUG=b:185593007
TEST=call_scripts && units

Change-Id: I9f080c1261387e74ceb177a9994186883b57a347
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/2959731
Tested-by: George Engelbrecht <engeg@google.com>
Reviewed-by: Alex Klein <saklein@chromium.org>
Commit-Queue: George Engelbrecht <engeg@google.com>
diff --git a/api/controller/controller_util_unittest.py b/api/controller/controller_util_unittest.py
index 0786958..038e5d8 100644
--- a/api/controller/controller_util_unittest.py
+++ b/api/controller/controller_util_unittest.py
@@ -12,6 +12,7 @@
 from chromite.lib import cros_test_lib
 from chromite.lib.parser import package_info
 from chromite.lib.chroot_lib import Chroot
+from chromite.lib.sysroot_lib import Sysroot
 
 
 class ParseChrootTest(cros_test_lib.MockTestCase):
@@ -44,6 +45,20 @@
     with self.assertRaises(AssertionError):
       controller_util.ParseChroot(common_pb2.BuildTarget())
 
+class ParseSysrootTest(cros_test_lib.MockTestCase):
+  """ParseSysroot tests."""
+
+  def testSuccess(self):
+    """test successful handling case."""
+    path = '/build/rare_pokemon'
+    sysroot_message = sysroot_pb2.Sysroot(path=path)
+    expected = Sysroot(path=path)
+    result = controller_util.ParseSysroot(sysroot_message)
+    self.assertEqual(expected, result)
+
+  def testWrongMessage(self):
+    with self.assertRaises(AssertionError):
+      controller_util.ParseSysroot(common_pb2.BuildTarget())
 
 class ParseBuildTargetTest(cros_test_lib.TestCase):
   """ParseBuildTarget tests."""