public inbox for gdb-cvs@sourceware.org help / color / mirror / Atom feed
From: Christian Biesinger <cbiesinger@sourceware.org> To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Remove unused code block in inf_ptrace_target::wait Date: Sat, 25 Apr 2020 22:25:13 +0000 (GMT) [thread overview] Message-ID: <20200425222513.BD922386F442@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b9771db784e287ec176dd2746a278eacdd973cf4 commit b9771db784e287ec176dd2746a278eacdd973cf4 Author: Kamil Rytarowski <n54@gmx.com> Date: Fri Apr 24 18:10:07 2020 +0200 Remove unused code block in inf_ptrace_target::wait Remove unused PT_GET_PROCESS_STATE block. It used to be used by OpenBSD, but it is now reimplemented independently in obsd-nat.c. gdb/ChangeLog: * inf-ptrace.c (inf_ptrace_target::wait): Remove `PT_GET_PROCESS_STATE' block. Change-Id: I9b872df8517b658c0dfe889fc1e4a7009bc5c076 Diff: --- gdb/ChangeLog | 5 +++++ gdb/inf-ptrace.c | 38 -------------------------------------- 2 files changed, 5 insertions(+), 38 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index ccc0baafb1e..ba0f680f974 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2020-04-25 Kamil Rytarowski <n54@gmx.com> + + * inf-ptrace.c (inf_ptrace_target::wait): Remove + `PT_GET_PROCESS_STATE' block. + 2020-04-24 Tom Tromey <tom@tromey.com> * symtab.h (symbol_get_demangled_name): Don't declare. diff --git a/gdb/inf-ptrace.c b/gdb/inf-ptrace.c index 4519a9ebef1..a83ffcc8798 100644 --- a/gdb/inf-ptrace.c +++ b/gdb/inf-ptrace.c @@ -353,44 +353,6 @@ inf_ptrace_target::wait (ptid_t ptid, struct target_waitstatus *ourstatus, } while (pid == -1); -#ifdef PT_GET_PROCESS_STATE - if (WIFSTOPPED (status)) - { - ptrace_state_t pe; - pid_t fpid; - - if (ptrace (PT_GET_PROCESS_STATE, pid, - (PTRACE_TYPE_ARG3)&pe, sizeof pe) == -1) - perror_with_name (("ptrace")); - - switch (pe.pe_report_event) - { - case PTRACE_FORK: - ourstatus->kind = TARGET_WAITKIND_FORKED; - ourstatus->value.related_pid = ptid_t (pe.pe_other_pid); - - /* Make sure the other end of the fork is stopped too. */ - fpid = waitpid (pe.pe_other_pid, &status, 0); - if (fpid == -1) - perror_with_name (("waitpid")); - - if (ptrace (PT_GET_PROCESS_STATE, fpid, - (PTRACE_TYPE_ARG3)&pe, sizeof pe) == -1) - perror_with_name (("ptrace")); - - gdb_assert (pe.pe_report_event == PTRACE_FORK); - gdb_assert (pe.pe_other_pid == pid); - if (fpid == inferior_ptid.pid ()) - { - ourstatus->value.related_pid = ptid_t (pe.pe_other_pid); - return ptid_t (fpid); - } - - return ptid_t (pid); - } - } -#endif - store_waitstatus (ourstatus, status); return ptid_t (pid); }
reply other threads:[~2020-04-25 22:25 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200425222513.BD922386F442@sourceware.org \ --to=cbiesinger@sourceware.org \ --cc=gdb-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).