Allow setting symbols path explicitly through  -p/--image-path.

As long as all arguments to opreport are still pass-through there is no
need to add explcit getopt cases.

Change-Id: Iac2d3ec2805f5207a089f623e9559c01abe7c7c0
diff --git a/oprofile_android b/oprofile_android
index 4f1a940..efdadde 100755
--- a/oprofile_android
+++ b/oprofile_android
@@ -439,12 +439,15 @@
 
   def _execute_opannotate(self, command_args):
     try:
-      opts, args = getopt.getopt(command_args, 'sa', ['source', 'assembly',
-                                                      'help'])
+      opts, args = getopt.getopt(command_args, 'sap:',
+                                 ['source', 'assembly', 'help', 'image-path='])
     except getopt.GetoptError, e:
       print '* Unsupported opannotate command arguments:', str(e)
       return 2
 
+    # Start with the default symbols directory
+    symbols_dirs = symbols_dir
+
     anno_flag = []
     for o, a in opts:
       if o in ('-s', '--source'):
@@ -454,10 +457,12 @@
         anno_flag.append('--objdump-params=-Cd')
       if o in ('--help'):
         anno_flag.append('--help')
+      if o in ('p', '--image-path'):
+        symbols_dirs = a + ',' + symbols_dir
 
     return execute([opannotate_bin,
       '--session-dir=' + self.session_dir,
-      '--image-path=' + symbols_dir + ',' + system_dir] + anno_flag + args)
+      '--image-path=' + symbols_dirs + ',' + system_dir] + anno_flag + args)
 
 # Main entry point
 tool = Tool(sys.argv)