title: How do I build Libgdx.so from source for Android with gdb tracing enabled?
body: <p>I have setup a debug ROM on an Android device, and enabled the DDMS Native Heap in search for a libgdx memory leak.</p>
  
  <p>I now have a trace, but no source code attached to follow the lead.</p>
  
  <p>I downloaded libgdx source code.</p>
  
  <p>How do I build it enabling gdb tracing so I can follow the code referenced by the trace ?</p>
  
  <p>Update:</p>
  
  <p>I built the debug .so libgdx from source 
  To do this, I modified the file:
  libgdx/gdx/jni/build-android32.xml</p>
  
  <p>Adding  to the compile-natives target
  I also added APP_OPTIM := debug to the Application.mk in the same folder
  And added '-g' to the Android.mk file in the same folder:
  LOCAL_CFLAGS := -g $(LOCAL_C_INCLUDES:%=-I%) -O2 -Wall -D__ANDROID__ </p>
  
  <p>This, indeed, produces a dbg libgdx.so dynamic library place in 
  libgdx/gdx/libs/armeabi</p>
  
  <p>Although I am getting closer, I still cannot get the name of the function that is loading memory.</p>
  
  <p>I am using arm-linux-androideabi-addr2line and the Hex address of the function, but it prints
  ??</p>