[Mesa-dev] [PATCH 12/23] intel: Add simple logging façade for Android

Chad Versace chadversary at chromium.org
Wed Sep 6 20:25:53 UTC 2017


On Mon 04 Sep 2017, Eero Tamminen wrote:
> Hi,
> 
> On 02.09.2017 11:17, Chad Versace wrote:
> > I'm bringing up Vulkan in the Android container of Chrome OS (ARC++).
> > 
> > On Android, stdio goes to /dev/null. On Android, remote gdb is even more
> > painful than the usual remote gdb. On Android, nothing works like you
> > expect and debugging is hell. I need logging.
> 
> Would non-remote Gdb work better?
> 
> I.e. use a chroot containing your normal Linux setup inside your Android,
> and use tools from that to debug Android stuff outside the chroot.
> 
> Everything that doesn't need to be inside the debugged process (like
> LD_PRELOAD tools) such as Gdb, "perf" etc, should work fine as long as you
> mount /dev, /proc, /sys there, along with having (the non-stripped versions
> of) the Android binaries in same path within the chroot, as they're outside.
> 
> (At least that worked fine for me few years ago, when I needed to debug &
> profile Android stuff.  If security is nowadays tightened, you may need to
> use your own more relaxed kernel config.)

The ARC++ environment is locked down even more tightly than regular
Android. For example, all syscalls go through a translation table in the
kernel that may rewrite the arguments; and all syscalls must be
explicitly whitelisted. I expect local-gdb-through-a-chroot may have
difficulty there. Anyway, disk space is too scarce for a chroot.


More information about the mesa-dev mailing list