Stop attaching a debugger on segfault on Mac (#1383)

This commit is contained in:
Jacqueline Deans 2022-11-07 15:27:00 -06:00 committed by GitHub
parent e65a0b0783
commit 1cf4ef58ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -69,22 +69,6 @@ void Trick::Executive::signal_handler(int sig) {
"/proc/%d/exe %d", debugger_command.c_str(), getpid(), getpid());
system(command);
}
#elif __APPLE__
char command[2048];
char path[1024] ;
uint32_t size = sizeof(path) ;
if (_NSGetExecutablePath(path, &size) == 0 ) {
if (attach_debugger == true) {
write( 2 , "Attempting to attach debugger... standby.\n" , 41 ) ;
sprintf(command, "%s -silent %s %d", debugger_command.c_str(), path, getpid());
system(command);
} else if (stack_trace == true ) {
write( 2 , "Attempting to generate stack trace... standby.\n" , 47 ) ;
sprintf(command, "%s -batch -s ${TRICK_HOME}/share/trick/lldb_commands -p %d",
debugger_command.c_str(), getpid());
system(command);
}
}
#endif
}