From 9fc57f35ebb7da7fa13940fd00cce455f25316ce Mon Sep 17 00:00:00 2001 From: Charles Baylis Date: Tue, 19 Nov 2024 22:27:37 +0100 Subject: [PATCH] gdb: Remove inappropriate comments Remove some inappropriate comments in darwin_nat_target::attach, gnu_nat_target::attach and inf_ptrace_target::attach. Tested by rebuilding on x86_64-linux. Copyright-paperwork-exempt: yes Approved-By: Tom Tromey --- gdb/darwin-nat.c | 2 +- gdb/gnu-nat.c | 2 +- gdb/inf-ptrace.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gdb/darwin-nat.c b/gdb/darwin-nat.c index 7ba1fbb6775..e4243f67648 100644 --- a/gdb/darwin-nat.c +++ b/gdb/darwin-nat.c @@ -2032,7 +2032,7 @@ darwin_nat_target::attach (const char *args, int from_tty) pid = parse_pid_to_attach (args); - if (pid == getpid ()) /* Trying to masturbate? */ + if (pid == getpid ()) error (_("I refuse to debug myself!")); target_announce_attach (from_tty, pid); diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c index 6cfac08e5ac..a8a4da1c873 100644 --- a/gdb/gnu-nat.c +++ b/gdb/gnu-nat.c @@ -2172,7 +2172,7 @@ gnu_nat_target::attach (const char *args, int from_tty) pid = parse_pid_to_attach (args); - if (pid == getpid ()) /* Trying to masturbate? */ + if (pid == getpid ()) error (_("I refuse to debug myself!")); target_announce_attach (from_tty, pid); diff --git a/gdb/inf-ptrace.c b/gdb/inf-ptrace.c index 36d6e2aa697..6ef2ea84562 100644 --- a/gdb/inf-ptrace.c +++ b/gdb/inf-ptrace.c @@ -141,7 +141,7 @@ inf_ptrace_target::attach (const char *args, int from_tty) pid_t pid = parse_pid_to_attach (args); - if (pid == getpid ()) /* Trying to masturbate? */ + if (pid == getpid ()) error (_("I refuse to debug myself!")); target_unpush_up unpusher; -- 2.11.4.GIT