From ae805f7818affe108e42b7eab128064e73d38bfd Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Thu, 5 Mar 2026 12:04:36 -1000 Subject: [PATCH] CONSOLE: Reliably identify running under a debugger on *nix hosts --- sim_console.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sim_console.c b/sim_console.c index 72097259..28a4f080 100644 --- a/sim_console.c +++ b/sim_console.c @@ -4346,7 +4346,7 @@ char command[128]; char response[256] = ""; FILE *f; -snprintf (command, sizeof (command), "ps -p %d | grep -E 'gdb|lldb|LLDB'", (int)getppid()); +snprintf (command, sizeof (command), "ps | grep %d | grep -E 'gdb|lldb|LLDB'", (int)getppid()); f = popen (command, "r"); if (f != NULL) { if (fgets(response, sizeof(response), f))