3

I want to build aosp native test and debug it on emulator. Is it possible to build executable with debugging symbols? I have tried to add -g and -ggdb to Android .bp:

    cflags: [
        "-Werror",
        "-Wall",
        "-g",
    ],

but it didn't help, I still getting stripped executable.

JuicyKitty
  • 318
  • 1
  • 16

2 Answers2

5

In the module declaration, add:

            strip: {
                keep_symbols: true,
            },

Reference: link.

2

You can find the unstripped binaries in $ANDROID_PRODUCT_OUT/symbols.

Simpl
  • 1,938
  • 1
  • 10
  • 21