[mythtv] Gdb Woes

Mark Spieth mark at digivation.com.au
Sun Jul 1 00:55:17 UTC 2018

On 7/1/2018 2:20 AM, David Engel wrote:
> Mark,
> I'm still having issues trying to get gdb to run.  Attached are two
> log files.  Can you make any sense of them?
> gdb.log is from running "bash -x ./gdb.sh | tee gdb.log".  The "Can't
> open socket: Permission denied." look suspicious.
> logcat.log is from running "adb logcat |& tee logcat.log".  The
> "Debugger is no longer active" looks suspicious here.
> David
did a quick search for "oreo gdbserver" and found this good info

They found your copy trick (a bit different)
adb push .../gdbserver /data/local/tmp
adb shell
$ cat /data/local/tmp/gdbserver | run-as |org.mythtv.mythfrontend| sh -c 
'cat > /data/data/|org.mythtv.mythfrontend|/gdbserver'

or do it your way is also fine with dd or the sh -c cat trick. no middle 
man. will also work on any version of android (I think).
chmod like normal of course is still required.

Key log lines

06-30 11:10:35.093 27145 27145 W gdbserver: type=1400 audit(0.0:4016): avc: denied { read } for name="stat" dev="proc" ino=4026540912 scontext=u:r:untrusted_app_25:s0:c512,c768 tcontext=u:object_r:proc_stat:s0 tclass=file permissive=0

+ /home/david/android/android-ndk/my-android-toolchain64/bin/gdb -n -x 
Can't open socket: Permission denied.

Easy way to fix #2 is change USE_IP=0 in gdb.sh and it should work 

#1 probably requires gdbserver from the latest ndk (and maybe gdb as 
well) see discussion on this.
You don't need to build with the latest ndk (stick with 13b) but there 
may be libc issues perhaps that affect us too.

Other tricks to try
adb shell -t
* not sure what this would help with.

It would be interesting to know what release of oreo nvidia used. 
prerelease 3 is not good apparently.

I suspect nvidia needs to release an update to fix these properly.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-dev/attachments/20180701/8e33e8a3/attachment.html>

More information about the mythtv-dev mailing list