<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">On 7/1/2018 2:20 AM, David Engel wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:20180630162016.GA16917@opus.istwok.net">
      <pre wrap="">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
</pre>
    </blockquote>
    did a quick search for "oreo gdbserver" and found this good info<br>
    <a class="moz-txt-link-freetext" href="https://github.com/android-ndk/ndk/issues/447">https://github.com/android-ndk/ndk/issues/447</a><br>
    <br>
    They found your copy trick (a bit different)<br>
    adb push .../gdbserver <span style="color: rgb(36, 41, 46);
      font-family: -apple-system, BlinkMacSystemFont, "Segoe
      UI", Helvetica, Arial, sans-serif, "Apple Color
      Emoji", "Segoe UI Emoji", "Segoe UI
      Symbol"; font-size: 14px; font-style: normal;
      font-variant-ligatures: normal; font-variant-caps: normal;
      font-weight: 400; letter-spacing: normal; orphans: 2; text-align:
      start; text-indent: 0px; text-transform: none; white-space:
      normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width:
      0px; background-color: rgb(255, 255, 255); text-decoration-style:
      initial; text-decoration-color: initial; display: inline
      !important; float: none;">/data/local/tmp</span><br>
    adb shell<span style="color: rgb(36, 41, 46); font-family:
      -apple-system, BlinkMacSystemFont, "Segoe UI",
      Helvetica, Arial, sans-serif, "Apple Color Emoji",
      "Segoe UI Emoji", "Segoe UI Symbol";
      font-size: 14px; font-style: normal; font-variant-ligatures:
      normal; font-variant-caps: normal; font-weight: 400;
      letter-spacing: normal; orphans: 2; text-align: start;
      text-indent: 0px; text-transform: none; white-space: normal;
      widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;
      background-color: rgb(255, 255, 255); text-decoration-style:
      initial; text-decoration-color: initial; display: inline
      !important; float: none;"><br>
      $ cat /data/local/tmp/gdbserver | run-as </span><span
      style="color: rgb(36, 41, 46); font-family: -apple-system,
      BlinkMacSystemFont, "Segoe UI", Helvetica, Arial,
      sans-serif, "Apple Color Emoji", "Segoe UI
      Emoji", "Segoe UI Symbol"; font-size: 14px;
      font-style: normal; font-variant-ligatures: normal;
      font-variant-caps: normal; font-weight: 400; letter-spacing:
      normal; orphans: 2; text-align: start; text-indent: 0px;
      text-transform: none; white-space: normal; widows: 2;
      word-spacing: 0px; -webkit-text-stroke-width: 0px;
      background-color: rgb(255, 255, 255); text-decoration-style:
      initial; text-decoration-color: initial; display: inline
      !important; float: none;"><code style="box-sizing: border-box; font-size: 11.9px; padding: 0px; margin: 0px; background: transparent none repeat scroll 0% 0%; border-radius: 3px; word-break: normal; white-space: pre; border: 0px none; display: inline; overflow: visible; line-height: inherit; overflow-wrap: normal;">org.mythtv.mythfrontend</code>
      sh -c 'cat > /data/data/</span><span style="color: rgb(36, 41,
      46); font-family: -apple-system, BlinkMacSystemFont, "Segoe
      UI", Helvetica, Arial, sans-serif, "Apple Color
      Emoji", "Segoe UI Emoji", "Segoe UI
      Symbol"; font-size: 14px; font-style: normal;
      font-variant-ligatures: normal; font-variant-caps: normal;
      font-weight: 400; letter-spacing: normal; orphans: 2; text-align:
      start; text-indent: 0px; text-transform: none; white-space:
      normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width:
      0px; background-color: rgb(255, 255, 255); text-decoration-style:
      initial; text-decoration-color: initial; display: inline
      !important; float: none;"><code style="box-sizing: border-box; font-size: 11.9px; padding: 0px; margin: 0px; background: transparent none repeat scroll 0% 0%; border-radius: 3px; word-break: normal; white-space: pre; border: 0px none; display: inline; overflow: visible; line-height: inherit; overflow-wrap: normal;">org.mythtv.mythfrontend</code>/gdbserver'<br>
      <br>
      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).<br>
      chmod like normal of course is still required.<br>
      <br>
    </span>Key log lines<br>
    <pre wrap="">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</pre>
    + /home/david/android/android-ndk/my-android-toolchain64/bin/gdb -n
    -x so/gdb.setup<br>
    Can't open socket: Permission denied.
    <br>
    <br>
    Easy way to fix #2 is change USE_IP=0 in gdb.sh and it should work
    (hopefully).<br>
    <br>
    #1 probably requires gdbserver from the latest ndk (and maybe gdb as
    well) see discussion on this.<br>
    You don't need to build with the latest ndk (stick with 13b) but
    there may be libc issues perhaps that affect us too.<br>
    <br>
    Other tricks to try<br>
    adb shell -t<br>
    * not sure what this would help with.<br>
    <br>
    It would be interesting to know what release of oreo nvidia used.
    prerelease 3 is not good apparently.<br>
    <br>
    I suspect nvidia needs to release an update to fix these properly.<br>
    <br>
    HTH<br>
    Mark<br>
  </body>
</html>