def _StripPC(addr, cpu_arch):
  """Strips the Thumb bit a program counter address when appropriate.

  Args:
    addr: the program counter address
    cpu_arch: Target CPU architecture.

  Returns:
    The stripped program counter address.
  """
  if cpu_arch == "arm":
    return addr & ~1
  return addr