0

I add "-g" option when compiling adb.exe for debug, but gdb said the symbol table in adb.exe not found, so I simply add these parameters in Android.bp to export the symbol table to pdb and then use windbg to debug it.

    @@ -487,7 +489,8 @@ cc_binary_host {
         },
         windows: {
             enabled: true,
-            ldflags: ["-municode"],
+            cflags: ["-g","-gcodeview"],
+            ldflags: ["-municode","-Wl,--pdb="],
             shared_libs: ["AdbWinApi"],
             required: [
                 "AdbWinUsbApi",

Then I can get the generated adb.pdb and adb.exe in the soong .intermediates directory. However,since I export the symbol table to adb.pdb. The symbols in adb.exe are missing,so there is still a error as shown below: enter image description here How to remove or skip the inject version step to make it succeed?

傅继晗
  • 927
  • 1
  • 8
  • 14

0 Answers0