[Mesa-dev] [PATCH 12/23] intel: Add simple logging façade for Android
Eero Tamminen
eero.t.tamminen at intel.com
Thu Sep 7 07:58:53 UTC 2017
Hi,
On 06.09.2017 23:25, Chad Versace wrote:
> On Mon 04 Sep 2017, Eero Tamminen wrote:
>> 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.
I see, it's actually ChromeOS running ARC++ container, not Android.
In that case, you would need run the chroot outside of the ARC++
container and just attach to the process inside the ARC++ container.
> Anyway, disk space is too scarce for a chroot.
Some possible solutions:
* Use larger disk and have extra ChromeOS partition for the chroot, or
enlarge the ChromeOS partition
* NFS-mount the desktop chroot with GDB setup + ARC binaries & symbols
-> requires building a ChromeOS kernel with NFS support
Btw. One anyway wants also tracing, debugger and trace/log facilities
are complementary features, not alternatives for each other.
- Eero
More information about the mesa-dev
mailing list