1

I'm implementing a few instrumented tests for a module (which is packaged in a aar archive, not apk) library I'm working on. The module is written partially in Java and partially in C.

Sadly a crash is occurring while running my tests and executing native code; I want to symbolicate the crash dump with ndk-stack in order to see the actual culprit and investigate my problem.

I know that those files should be in the object directory obj/, right inside the project directory, specifically:

$PROJECT_PATH/obj/local/<ABI>

The problem is that they simply aren't there. Where are they? How can I let the androidTest related tasks generate them or showing me where they are? What am I missing?

The project structure is the following:

MyProject
 |_ :app (a single button application which integrates the library)
 |_ :myLibrary (the actual library I'm working on and testing)
    |_ java
    |  |_ my.package.name
    |  |_ my.package.name (androidTest) <- a test here crashes
    |  |_ my.package.name (test)
    |_ cpp
       |_ my native files
fredmaggiowski
  • 2,232
  • 3
  • 25
  • 44
  • I take it your **not using** `Android Studio Gradle` build (so **not** `CMake` or `ndkBuild`). Can you elaborate a little on your build system ? – Jon Goodwin May 15 '18 at 14:51
  • I'm actually using plain Android Studio Gradle build. To be more specific I use `ndkBuild`. I've written a custom `Android.mk` and `Application.mk` files to manage the shared object build. To execute the tests I use the standard IDE tools (e.g. the "play button" on single test cases or test class). – fredmaggiowski May 15 '18 at 15:05
  • A typical path to `.obj` files (`ndkBuild`) would be `...\android-project\app\build\intermediates\ndkBuild\debug\obj\local\armeabi-v7a\objs-debug\SDL2\src` why have you not used your operating system search for `*.o` files ? – Jon Goodwin May 15 '18 at 15:32
  • That's super weird, I had performed a `find` (I am running macOS) in the whole project directory but didn't found anything with the `.o` extension. Now I've manually moved in the directory you specified and there they are! Specifically the path is: `$PROJECT_PATH/myLibrary/build/intermediates/ndkBuild/debug/obj`. – fredmaggiowski May 16 '18 at 08:13
  • cool, yes that's the place I would expect,anything else you need ? – Jon Goodwin May 16 '18 at 09:32
  • Nope, that's it, I've successfully symbolicated my crash dump, thanks! :) – fredmaggiowski May 16 '18 at 09:58

1 Answers1

0

After the discussion in the comments it appeared that the correct path to find debug object symbols is:

$PROJECT_PATH/myLibrary/build/intermediates/ndkBuild/debug/obj
fredmaggiowski
  • 2,232
  • 3
  • 25
  • 44