[mythtv] Gdb Woes
David Engel
david at istwok.net
Sun Jul 1 02:53:19 UTC 2018
On Sun, Jul 01, 2018 at 10:55:17AM +1000, Mark Spieth wrote:
> 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
> https://github.com/android-ndk/ndk/issues/447
>
> 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.
Using cat with quoted redirection was going to be my next attempt.
> 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
> so/gdb.setup
> Can't open socket: Permission denied.
>
> Easy way to fix #2 is change USE_IP=0 in gdb.sh and it should work
> (hopefully).
The actual error is different (Connection reset by peer instead of
Permission denied), but still no go. gdb2.log file attached.
> #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.
I installed NDK 17.whatever using Android Studio and used the
gdbserver that was installed in
/home/david/android/android-sdk-linux/ndk-bundle/prebuilt/android-arm64/gdbserver/gdbserver,
but it didn't make a difference. logcat2.log file attached.
> Other tricks to try
> adb shell -t
> * not sure what this would help with.
Which invocation of adb shell?
> It would be interesting to know what release of oreo nvidia used. prerelease
> 3 is not good apparently.
The reported version is 8.0.0 and the security patch level is from May
5 2018, so it looks to be current, at least for 8.0.
David
> I suspect nvidia needs to release an update to fix these properly.
--
David Engel
david at istwok.net
More information about the mythtv-dev
mailing list