Page MenuHomePhabricator

[debugserver/Apple Silicon] Handoff connections when attaching to translated processes

Authored by davide on Jul 21 2020, 12:16 PM.



When we detect a process that the native debugserver cannot handle, handoff the connection fd to the translated debugserver.

Diff Detail

Event Timeline

davide created this revision.Jul 21 2020, 12:16 PM

With this patch, debugging a translated app will only work when we invoke debugserver with --fd for its communication back to lldb. e.g. running 'debugserver localhost:2000 --attach=translated-app' will pass -fd=-1 as a command line argument to /Library/Apple/usr/libexec/oah/debugserver. Doing this properly would involve passing the same hostspec:portnum that debugserver received in this case -- but could we at least error out in DNBProcessAttach if communcation_fd==-1 so it's clear that this is not yet a supported workflow?

yeah, I think it's reasonable.

davide updated this revision to Diff 282073.Jul 30 2020, 4:07 PM

Added the check that Jason requested.

davide accepted this revision.Jul 30 2020, 4:20 PM

Reviewed by Jason privately.

This revision is now accepted and ready to land.Jul 30 2020, 4:20 PM