Debugging android example

Hello. I’m trying to debug code based on the android-project SDL example.
The crash I’m working with happens within a loop in SDL_main(), and the app
exits before GDB has a chance to attach. I’ve tried creating a loop with:
t=1;while(t);, and I’m supposed to be able to change t, but I’m not sure
how to go about that as the app is busy running when it gets to t, and when
I ctrl-c, then the execution isn’t stopped at that while loop. I get the

warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.
warning: shared library handler failed to enable breakpoint
0xafd0c51c in epoll_wait () from
(gdb) c
^C[New Thread 8452]

Program received signal SIGINT, Interrupt.
[Switching to Thread 8452]
0xafd0c51c in epoll_wait () from
(gdb) quit
The program is running. Exit anyway? (y or n) y

Any clues how I can debug this?