[mythtv] Android gdb woes

Mark Spieth mark at digivation.com.au
Tue Mar 6 21:23:33 UTC 2018


On 3/7/2018 3:57 AM, Peter Bennett wrote:
> Trying to debug on Android.
>
> I am using the gdb.sh script with an NVidia shield.
>
> If I run ./gdb.sh on my linux machien, then it displays a bunch of 
> messages, and eventually gets to a (gdb) prompt. If I enter c 
> (continue), MythTV launches on the Shield and I can debug it by using 
> ctrl-c and using gdb commands.
>
> However, sometimes, after entering c (continue), nothing happens. 
> There is a message on the shield screen that it is waiting for the 
> debugger to attach and a button that lets you cancel. It gets no further.
>
> At first this happened about 1 time out of 4. I tried restarting the 
> shield and other things and eventually it would work again.
>
> Now this happens every time. Restarting the shield does not help, 
> killing mythtv from adb does not help.
>
> I can debug by starting MythTV from the shield and then connecting 
> with ./gdb.sh. If I do that I get a bunch of SIG33 errors in gdb and 
> messages on the shield that the application has stopped responding. 
> This is not ideal.
>
> Any idea what I can do to get this to work?
If you have gdb start trouble, extend the startup timeout. need extra 
opt in adb shell am start command (I think).

gdb.sh makes a copy of all so files in the so directory as the files on 
the device dont have debug syms.

There are also 2 modes: adb and ip modes. Ive found IP works better but 
maybe for you adb tunnel is better. try that. USE_IP=0

That said, the current script works well and every time for me. is there 
something else with your environment that may be contributing? You 
mentioned a personal .gdbinit. try moving it aside temp. I dont have one 
of those.

make sure that you are using the 64 bit gdb (make.inc is correct).

USE_SU mode is no good for the shield unless you have rooted it.

Mark






More information about the mythtv-dev mailing list