From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) by sourceware.org (Postfix) with ESMTPS id B20C638930D5 for ; Fri, 24 Apr 2020 10:10:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org B20C638930D5 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=gmx.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=n54@gmx.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1587723026; bh=W0Gp8yqxTvZWI8DA2OsU9Rt0yMxf4C6Hs6uAcOd6DZI=; h=X-UI-Sender-Class:To:References:From:Subject:Date:In-Reply-To; b=Fi8SR11un4u0QRCt0KNYu0dtahsg1HjtcA1HFTFcPawqZ2PcyPuF2JnyfOfw0RXeN JC+7kZc76GPfdOb7HYYpxErflsH+m47bMs0f92cgHxkbIlmPTjAQjY7+2dPzUFNU8g vA3rOCMy4dLrlkSB5Y1t5pW6QfPk3tJcKh92R7OQ= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.0.241] ([89.79.191.25]) by mail.gmx.com (mrgmx105 [212.227.17.174]) with ESMTPSA (Nemesis) id 1MGQj7-1jR2cR1gVR-00Go8r; Fri, 24 Apr 2020 12:10:26 +0200 To: Simon Marchi , gdb-patches@sourceware.org References: <20200417144508.6366-1-n54@gmx.com> <2eaea1b8-215c-c628-bedc-4b70900c18f9@simark.ca> From: Kamil Rytarowski Autocrypt: addr=n54@gmx.com; prefer-encrypt=mutual; keydata= mQINBFVwUF8BEADHmOg7PFLIcSDdMx5HNDYr8MY2ExGfUTrKwPndbt3peaa5lHsK+UGoPG48 KiWkhEaMmjaXHFa7XgVpJHhFmNoJXfPgjI/sOKTMCPQ5DEHEHTibC4mta7IBAk+rmnaOF0k8 bxHfP8Qbls66wvicrAfTRXn/1ReeNc3NP4Sq39PoVHkfQTln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9bvg06vD0o+b7SdA1vrBgRG41t0OCIyf vejz65Xpin2EtCllcBM8zUCxHo43blON8fNw70P1Ec0loBp4TAal1MiXbB8kxRTRcEPVO9YF 9NPsFxycoWl0ZSvu4ESrQlrjRbVv+W0Fy/XqcQwEtDziFQHQXNRbTy8INPD49CsB7BkKRK+f 1vMmw7SxfsyEhyCgo9ZWfHb/+w9T5h+UhF87L/m287z7W+s4aCAPBzjbIWhtngGJJwIgiWdI I9J6YJLcHLvVZLw7xzA/flcjc0VfzOgJOJw3hBukHnEz7/CKgnABwyNu52P+PQbxVTiTjMKm 06eV732u9ZLD9ZgEazfmyGDHzsuzoXwsRnmcnbwYYAiynS+vfGl5oMtMa5qzsPhlzuvRlXHm zr8VjF8c9RThvyZyyHtWYAqNmBecMvM0whigjMeoAMJ5LtpyZgxjbHj1XnVdNBZgfJkOzsc/ twffi7RYphRx0d9z5UZ1Yl5Rvl05vTaJ7YhhNC7xuE8yGOQmDUsPDwWqO/eXUDErJjCOBR5b 0yILqRPYNT0Fj/th9gtEbZy1Gp0TVBkZM3tfjDRu43Pn6iSKObO/j0rNuq1LwN/EMxDifeZO 4XSbcg== Subject: Re: [PATCH] Add basic event handling in the NetBSD target Message-ID: Date: Fri, 24 Apr 2020 12:09:11 +0200 User-Agent: Mozilla/5.0 (X11; NetBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <2eaea1b8-215c-c628-bedc-4b70900c18f9@simark.ca> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="FC0JM9yn9aQ9auTCLj3YNodw41JhhHrLb" X-Provags-ID: V03:K1:o1btCZnvjINEQv6m99YCj0HOuWpkxw97FCFXcmfXZlSMTtCJ9RU 6lWiDEoAC/hKaoVSzttnWIqOKlFQYTt+I/59sc8FeP13HQhLN7WiWoHBA2LI6NyL/PcqohB HDR12nAmqBQyxAaNlvkZ9zpUm1LQaPEct+OAkeiX/X2nl+XHdj8Bp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asjFehF75PAAtQhpadNJQKgn7hflACv/Asmmxn3XI/v SoXqHidh3yT82zP2PisitKmLVz11td3y6BweLuB8v6bSAr6nthGZVRFnEiJPIuYQtRKkmgZkY afi2t9SOvbICloMya5VvgBs60V39XjTnvVP2JctiqNyDoR/Uen9/aYcs04JuNdzo7FHxntjAU 2eHHDJrUd1z4l0elmaPPshp+XWHwN38MLeT+kc7BTWIj7eIBI0jDlw1VCjMAhMNn6rtMw= X-Spam-Status: No, score=-27.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 10:10:34 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --FC0JM9yn9aQ9auTCLj3YNodw41JhhHrLb Content-Type: multipart/mixed; boundary="OSkIo2i6XGZu3RUndKGnI6qeQ5fre7U5y"; protected-headers="v1" From: Kamil Rytarowski To: Simon Marchi , gdb-patches@sourceware.org Message-ID: Subject: Re: [PATCH] Add basic event handling in the NetBSD target References: <20200417144508.6366-1-n54@gmx.com> <2eaea1b8-215c-c628-bedc-4b70900c18f9@simark.ca> In-Reply-To: <2eaea1b8-215c-c628-bedc-4b70900c18f9@simark.ca> --OSkIo2i6XGZu3RUndKGnI6qeQ5fre7U5y Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 24.04.2020 03:33, Simon Marchi wrote: > Hi Kamil, >=20 > Check the indentation throughout the patch, some lines have 1 space ind= ent instead of 2. >=20 OK. > On 2020-04-17 10:45 a.m., Kamil Rytarowski wrote: >> Implement the following events: >> - single step (TRAP_TRACE) >> - software breakpoint (TRAP_DBREG) >> - exec() (TRAP_EXEC) >> - syscall entry/exit (TRAP_SCE / TRAP_SCX) >> >> Add support for NetBSD specific ::wait () and ::resume (). >> >> Instruct the generic code that exec and syscall events are supported. >> >> Define an empty nbsd_get_syscall_number as it is prerequisite for >> catching syscall entry and exit events, even if it is unused. >> This function is used to detect whether the gdbarch supports the >> 'catch syscall' feature. >> >> gdb/ChangeLog: >> >> * nbsd-nat.c: Include "sys/wait.h". >> * (nbsd_nat_target::resume, nbsd_wait, nbsd_nat_target::wait) >=20 > Remove asterisk on last line. >=20 OK. >> diff --git a/gdb/nbsd-nat.c b/gdb/nbsd-nat.c >> index d41cfc815d3..f9e85e10b16 100644 >> --- a/gdb/nbsd-nat.c >> +++ b/gdb/nbsd-nat.c >> @@ -28,6 +28,7 @@ >> #include >> #include >> #include >> +#include >> >> /* Return the name of a file that can be opened to get the symbols fo= r >> the child process identified by PID. */ >> @@ -539,3 +540,213 @@ nbsd_nat_target::info_proc (const char *args, en= um info_proc_what what) >> >> return true; >> } >> + >> +/* Resume execution of thread PTID, or all threads if PTID is -1. If= >> + STEP is nonzero, single-step it. If SIGNAL is nonzero, give it >> + that signal. */ >> + >> +void >> +nbsd_nat_target::resume (ptid_t ptid, int step, enum gdb_signal signa= l) >> +{ >> + int request; >> + >> + if (ptid.lwp_p ()) >> + { >> + /* If ptid is a specific LWP, suspend all other LWPs in the pro= cess. */ >> + inferior *inf =3D find_inferior_ptid (this, ptid); >> + >> + for (thread_info *tp : inf->non_exited_threads ()) >> + { >> + if (tp->ptid.lwp () =3D=3D ptid.lwp ()) >> + request =3D PT_RESUME; >> + else >> + request =3D PT_SUSPEND; >> + >> + if (ptrace (request, tp->ptid.pid (), NULL, tp->ptid.lwp ()= ) =3D=3D -1) >> + perror_with_name (("ptrace")); >> + } >=20 > I know that you'll say it's because FreeBSD does it this way, but still= it surprised > me. If the core of GDB asks to resume one specific thread, it doesn't = mean you should > suspend the other threads, they should just be left in whatever state t= hey are. Is there > a reason to stop the other threads here? >=20 In Linux there can be non-stop mode and threads are managed (stopped, started, etc) individually. On NetBSD we can start and stop the whole process, regardless of the number of threads in it. We need to set the state of all threads before PT_CONTINUE (or assume unchanged state of them). If a thread is not expected to be suspended, we shall set its flag to resume. The same for single-step (PT_STEP). This approach simplifies the implementation as I don't need to track internally which thread has what status and merely save a few syscalls. >> + } >> + else >> + { >> + /* If ptid is a wildcard, resume all matching threads (they won= 't run >> + until the process is continued however). */ >> + for (thread_info *tp : all_non_exited_threads (this, ptid)) >> + if (ptrace (PT_RESUME, tp->ptid.pid (), NULL, tp->ptid.lwp ()= ) =3D=3D -1) >> + perror_with_name (("ptrace")); >> + ptid =3D inferior_ptid; >=20 > Can you explain this? Ideally the resume method should not rely on inf= erior_ptid. We > are working on reducing the dependencies on this global, in favor of pa= ssing the context > by parameters. Here, the `ptid` parameter should be enough. >=20 The caller can pass minus_one_ptid, which makes no sense for NetBSD and certainly in the multi-target support. Scenarios, as I can see them on NetBSD: - passing ptid_t (pid, 0, 0) -> resume the whole process with all the threads - passing ptid_t (pid, lwp, 0) -> resume pid::lwp with all the other threads suspended in pid (`set scheduler-lock') - passing ptid_t (-1, ?, ?) -> confusion to me so I try to find any fallback If we can abandon the -1 case, I can drop the inferior_ptid usage. If the core no longer passes -1 (it could be), we shall cleanup existing code that handles this as it could happen. If a refactoring can happen, this shall be followed by addition of gdb_assert(ptid !=3D minus_one_ptid= ). >> + } >> + >> + if (step) >> + { >> + for (thread_info *tp : all_non_exited_threads (this, ptid)) >> + if (ptrace (PT_SETSTEP, tp->ptid.pid (), NULL, tp->ptid.lwp ()= ) =3D=3D -1) >> + perror_with_name (("ptrace")); >> + } >> + else >> + { >> + for (thread_info *tp : all_non_exited_threads (this, ptid)) >> + if (ptrace (PT_CLEARSTEP, tp->ptid.pid (), NULL, tp->ptid.lwp = ()) =3D=3D -1) >> + perror_with_name (("ptrace")); >> + } >> + >> + if (minus_one_ptid =3D=3D ptid) >> + /* Resume all threads. Traditionally ptrace() only supports >> + single-threaded processes, so simply resume the inferior. */ >> + ptid =3D ptid_t (inferior_ptid.pid ()); >> + >> + if (catch_syscall_enabled () > 0) >> + request =3D PT_SYSCALL; >> + else >> + request =3D PT_CONTINUE; >> + >> + /* An address of (void *)1 tells ptrace to continue from >> + where it was. If GDB wanted it to start some other way, we have= >> + already written a new program counter value to the child. */ >> + if (ptrace (request, ptid.pid (), (void *)1, gdb_signal_to_host (si= gnal)) =3D=3D -1) >> + perror_with_name (("ptrace")); >> +} >> + >> +/* Implement the "update_thread_list" target_ops method. */ >> + >> +static ptid_t >> +nbsd_wait (ptid_t ptid, struct target_waitstatus *ourstatus, int opti= ons) >=20 > The comment doesn't match the function. >=20 I will fix. > Since this function only returns a pid, I think it would be clearer if = it returned > an int or pid_t. At first glance, I didn't see that it returned a ptid= _t with only > the pid field filled. If the caller needs to transform it into a ptid,= it can do that. >=20 >> +{ >> + pid_t pid; >> + int status; >> + >> + set_sigint_trap (); >> + >> + do >> + { >> + /* The common code passes WNOHANG that leads to crashes, overwr= ite it. */ >> + pid =3D waitpid (ptid.pid (), &status, 0); >=20 > What is crashing exactly? >=20 The core code asks to waitpid() with WNOHANG, receives pid=3D0 (nobody) and crashes. It's a generic bug that shall be fixed... but it looks like nobody really obeys the core and the 3rd argument is overwritten (compare: rs6000-nat.c, obsd-nat.c, inf-ptrace.c or Linux...). I've landed into more similar generic nuances during my effort on GDB, that handling events promptly can crash the core and I need to change the behavior to emulate other kernels. It would be better to fix the core, but it is not NetBSD's fault and not a blocker for NetBSD support. If there is interest in fixing it, I can file a bug report independently. I don't pledge to work on it myself (at least as long as I can merely focus on one kernel support). >> + } >> + while (pid =3D=3D -1 && errno =3D=3D EINTR); >> + >> + clear_sigint_trap (); >> + >> + if (pid =3D=3D -1) >> + perror_with_name (_("Child process unexpectedly missing")); >> + >> + store_waitstatus (ourstatus, status); >> + return ptid_t (pid); >> +} >> + >> +/* Wait for the child specified by PTID to do something. Return the >> + process ID of the child, or MINUS_ONE_PTID in case of error; store= >> + the status in *OURSTATUS. */ >> + >> +ptid_t >> +nbsd_nat_target::wait (ptid_t ptid, struct target_waitstatus *ourstat= us, >> + int target_options) >> +{ >> + ptid_t wptid =3D nbsd_wait(ptid, ourstatus, target_options); >=20 > Missing space. >=20 OK. >> + >> + /* If the child stopped, keep investigating its status. */ >> + if (ourstatus->kind !=3D TARGET_WAITKIND_STOPPED) >> + return wptid; >> + >> + pid_t pid =3D wptid.pid (); >> + >> + /* Extract the event and thread that received a signal. */ >> + ptrace_siginfo_t psi; >> + if (ptrace (PT_GET_SIGINFO, pid, &psi, sizeof (psi)) =3D=3D -1) >> + perror_with_name (("ptrace")); >> + >> + /* Pick child's siginfo_t. */ >> + siginfo_t *si =3D &psi.psi_siginfo; >> + >> + int lwp =3D psi.psi_lwpid; >> + >> + int signo =3D si->si_signo; >> + const int code =3D si->si_code; >> + >> + /* Construct PTID with a specified thread that received the event. >> + If a signal was targeted to the whole process, lwp is 0. */ >> + wptid =3D ptid_t (pid, lwp, 0); >> + >> + /* Bail out on non-debugger oriented signals.. */ >> + if (signo !=3D SIGTRAP) >> + return wptid; >> + >> + /* Stop examining non-debugger oriented SIGTRAP codes. */ >> + if (code <=3D SI_USER || code =3D=3D SI_NOINFO) >> + return wptid; >> + >> + if (in_thread_list (this, ptid_t (pid))) >> + { >> + thread_change_ptid (this, ptid_t (pid), wptid); >> + } >=20 > Curly braces not needed. >=20 OK. >> diff --git a/gdb/nbsd-tdep.c b/gdb/nbsd-tdep.c >> index 52e0640e35c..d5d1b7211c1 100644 >> --- a/gdb/nbsd-tdep.c >> +++ b/gdb/nbsd-tdep.c >> @@ -444,6 +444,21 @@ nbsd_info_proc_mappings_entry (int addr_bit, ULON= GEST kve_start, >> } >> } >> >> +/* Implement the "get_syscall_number" gdbarch method. */ >> + >> +static LONGEST >> +nbsd_get_syscall_number (struct gdbarch *gdbarch, thread_info *thread= ) >> +{ >> + >> + /* FreeBSD doesn't use gdbarch_get_syscall_number since NetBSD >> + native targets fetch the system call number from the >> + 'si_sysnum' member of siginfo_t in nbsd_nat_target::wait. >> + However, system call catching requires this function to be >> + set. */ >=20 > FreeBSD? >=20 I will fix it. > Simon >=20 --OSkIo2i6XGZu3RUndKGnI6qeQ5fre7U5y-- --FC0JM9yn9aQ9auTCLj3YNodw41JhhHrLb Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEELaxVpweEzw+lMDwuS7MI6bAudmwFAl6iusgACgkQS7MI6bAu dmwYQQ/+MHCY3XLD3BgGxQtl+BNCM3yjVgO4a48mQEaFTV+hp7xiDmoayMc0B846 FgHTWn+TskAlzkVKVl26oq+oOyb6TToHO/amYxkF40BBCn/b2F8CsWVyaecKDN/1 7jVLvTIc2No1gS7rI829vz3INKawYqQO3AXvkwb/FDCKXfhdxU+VE+9KZt0xLOdB aifLxTUEmkXONw+6DUIy49SaDhKs7tna52FRLY+Amyd3zBebMmVoEYph6VP+yfIU TwTTeLCyf2/Tu1Lh1vypzuLixPpBP8szCRb2RVgwQqZUH64lISbAIwSw6Jtk4QTI yqOXjyhjXO85WckaUBM8soKlAfcTgzX8DGEWTqUlUaq6SZXmJz6RNsCiDvUm7yIX hJB3BXaD6UTCO8Fkawrn19M55TsFANU99W9ShxwPEcViA0ynwvsYoQ/GUKpkK71N 80ZvT4/hmWTXPlkP3Wpq00bKyKaiLiCMlVLEpwXRUtnTMIETBiILut3yoMul/NRO OGhfYeLJe/vn2xKQrYr4uuOYlpB0o9EkP782m6k8YcEeJIFWNgD0C1VzOkjimakc IjTByOf5tO9lt4ZF/l/lRpsU3ddEBod+Gj7C7bwb48vrPu08ChjFDPIunLM6trJs NTVecxfVg3iC4sxJAC++TKOUc58clpbrWJcFIJpe+uM0W666M7U= =ycNW -----END PGP SIGNATURE----- --FC0JM9yn9aQ9auTCLj3YNodw41JhhHrLb--