[all-commits] [llvm/llvm-project] eb3136: Fix debugserver translation check

Alexandre Perez via All-commits all-commits at lists.llvm.org
Thu May 5 11:31:42 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: eb3136f022b3e5061fe790e7886f4bb592d8a1d1
      https://github.com/llvm/llvm-project/commit/eb3136f022b3e5061fe790e7886f4bb592d8a1d1
  Author: Alexandre Perez <alexandrecperez at gmail.com>
  Date:   2022-05-05 (Thu, 05 May 2022)

  Changed paths:
    M lldb/tools/debugserver/source/DNB.cpp
    M lldb/tools/debugserver/source/DNBDefs.h
    M lldb/tools/debugserver/source/RNBRemote.cpp

  Log Message:
  -----------
  Fix debugserver translation check

Currently, debugserver has a test to check if it was launched in
translation. The intent was to cover the case where an x86_64
debugserver attempts to control an arm64/arm64e process, returning
an error. However, this check also covers the case where users
are attaching to an x86_64 process, exiting out before attempting
to hand off control to the translated debugserver at
`/Library/Apple/usr/libexec/oah/debugserver`.

This diff delays the debugserver translation check until after
determining whether to hand off control to
`/Library/Apple/usr/libexec/oah/debugserver`. Only when the
process is not translated and thus has not been handed off do we
check if the debugserver is translated, erroring out in that case.

Reviewed By: jasonmolenda

Differential Revision: https://reviews.llvm.org/D124814




More information about the All-commits mailing list