public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: Tom de Vries <tdevries@suse.de>, gdb-patches@sourceware.org
Subject: Re: [PATCH 1/3] [gdb/tdep] Add syscall number cache
Date: Mon, 27 Nov 2023 10:52:45 -0500	[thread overview]
Message-ID: <76d0f97a-a2ff-42d0-a31b-49d7b155080f@simark.ca> (raw)
In-Reply-To: <e0c4e6ec-88fa-4b1d-9113-d9ad378d38f7@suse.de>

On 11/24/23 17:19, Tom de Vries wrote:
>> If we're going to use lp->syscall_number (if it is not -1) and it
>> disagrees with gdbarch_get_syscall_number, what's the point in calling
>> gdbarch_get_syscall_number in the first place?
> 
> The debug printf that notes the override of gdbarch_get_syscall_number by the cached syscall number.
> 
>> Should the logic be:
>>
>>    if (new_syscall_state == TARGET_WAITKIND_SYSCALL_RETURN
>>        && lp->syscall_number != -1)
>>      // use lp->syscall_number
>>    else
>>      // call gdbarch_get_syscall_number
>>
>> ?
> 
> If we don't care about that particular type of debug printf, then yes.

In my opinion it doesn't add any value to call
gdbarch_get_syscall_number just to be able to make that debug printf.

Simon

  reply	other threads:[~2023-11-27 15:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-22  9:10 Tom de Vries
2023-11-22  9:10 ` [PATCH 2/3] [gdb/tdep] Add gdbarch_extended_event_to_syscall Tom de Vries
2023-11-22  9:10 ` [PATCH 3/3] [gdb/tdep] Use ptrace events to get current syscall Tom de Vries
2023-11-22 16:16 ` [PATCH 1/3] [gdb/tdep] Add syscall number cache John Baldwin
2023-11-24 21:09 ` Simon Marchi
2023-11-24 22:19   ` Tom de Vries
2023-11-27 15:52     ` Simon Marchi [this message]
2023-11-27 20:25       ` 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=76d0f97a-a2ff-42d0-a31b-49d7b155080f@simark.ca \
    --to=simark@simark.ca \
    --cc=gdb-patches@sourceware.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).