Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions lldb/tools/debugserver/source/DNB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -475,9 +475,17 @@ nub_process_t DNBProcessAttach(nub_process_t attach_pid,
extern int communication_fd;

if (communication_fd == -1) {
fprintf(stderr, "Trying to attach to a translated process with the "
"native debugserver, exiting...\n");
exit(1);
DNBLogError("Trying to attach to a translated process with the "
"native debugserver, exiting...\n");
return INVALID_NUB_PROCESS_ARCH;
}

struct stat st;
if (::stat(translated_debugserver, &st) != 0) {
DNBLogError("Translated inferior process but Rosetta debugserver not "
"found at %s",
translated_debugserver);
return INVALID_NUB_PROCESS_ARCH;
}

snprintf(fdstr, sizeof(fdstr), "--fd=%d", communication_fd);
Expand Down