From: Simon Marchi <simark@simark.ca>
To: John Baldwin <jhb@FreeBSD.org>, Tom de Vries <tdevries@suse.de>,
gdb-patches@sourceware.org
Subject: Re: [RFC 1/3] [gdb] Call gdbarch_get_syscall_number less often
Date: Tue, 21 Nov 2023 16:19:35 -0500 [thread overview]
Message-ID: <5f90118c-c99f-44df-9a9a-9ab291430797@simark.ca> (raw)
In-Reply-To: <270c0418-e216-415a-b40b-d100983cb6e0@FreeBSD.org>
On 11/21/23 13:03, John Baldwin wrote:
> I think you can use linux_nat_target::set_syscall_catchpoint to do the
> invalidation. From my reading it is called each time a syscall catchpoint
> is added or removed, and needed is set to false if there are no more
> catchpoints (so syscall catches are disabled). I think that means
> you could do something like:
>
> linux_nat_target::set_syscall_catchpoint ()
> {
> if (!needed)
> iterate_over_lwps (ptid_t (pid), [] (struct lwp_info *lp)
> {
> lp->syscall_number = -1;
> });
> }
What about this corner case of a corner case:
1. you have a syscall catchpoint, you hit it (the syscall entry)
2. you delete the syscall catchpoint
3. you create a syscall catchpoint again
4. you continue, expecting to hit the syscall exit
Will step 2 cause set_syscall_catchpoint to be called, and will we
therefore lose the information that would have been useful at step 4?
Simon
next prev parent reply other threads:[~2023-11-21 21:19 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-20 15:37 Tom de Vries
2023-11-20 15:37 ` [RFC 2/3] [gdb/tdep] Add gdbarch_extended_event_to_syscall Tom de Vries
2023-11-20 15:37 ` [RFC 3/3] [gdb] Use ptrace events to get current syscall Tom de Vries
2023-11-20 16:12 ` [RFC 1/3] [gdb] Call gdbarch_get_syscall_number less often Simon Marchi
2023-11-21 0:29 ` John Baldwin
2023-11-21 10:26 ` Tom de Vries
2023-11-21 17:54 ` John Baldwin
2023-11-21 2:43 ` Simon Marchi
2023-11-21 11:08 ` Tom de Vries
2023-11-21 18:03 ` John Baldwin
2023-11-21 21:19 ` Simon Marchi [this message]
2023-11-21 22:17 ` John Baldwin
2023-11-22 12:58 ` Tom de Vries
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=5f90118c-c99f-44df-9a9a-9ab291430797@simark.ca \
--to=simark@simark.ca \
--cc=gdb-patches@sourceware.org \
--cc=jhb@FreeBSD.org \
--cc=tdevries@suse.de \
/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: link
Be 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).