Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: John Baldwin <jhb@FreeBSD.org>
To: Simon Marchi <simark@simark.ca>, Pedro Alves <palves@redhat.com>,
	gdb-patches@sourceware.org
Subject: Re: [PATCH 2/2] target_set_syscall_catchpoint, use gdb::array_view and bool
Date: Wed, 06 Dec 2017 22:38:00 -0000	[thread overview]
Message-ID: <4f91f6f2-9b0f-d750-5d03-30fc23c0613d@FreeBSD.org> (raw)
In-Reply-To: <19e8ceb2-8c71-9d94-eeff-324200f2582b@simark.ca>

On 12/3/17 10:18 AM, Simon Marchi wrote:
> On 2017-10-30 11:59 AM, John Baldwin wrote:
>> On 10/30/17 3:32 PM, Pedro Alves wrote:
>>> I noticed that we're passing down a data/size pair to
>>> target_ops::to_set_syscall_catchpoint.  This commit makes use of
>>> gdb::array_view instead.  While at it, use bool where appropriate as
>>> well.
>>>
>>> gdb/ChangeLog:
>>> yyyy-mm-dd  Pedro Alves  <palves@redhat.com>
>>>
>>> 	* break-catch-syscall.c (insert_catch_syscall)
>>> 	(remove_catch_syscall): Adjust to pass reference to
>>> 	inf_data->syscalls_counts directly via gdb::array_view.
>>> 	* linux-nat.c (linux_child_set_syscall_catchpoint): Adjust to use
>>> 	bool and gdb::array_view.
>>
>> I believe fbsd-nat.c will need a similar fixup?  It doesn't use the
>> values passed but does implement the target method.
> 
> Hi John,
> 
> Can you check if this updated patch builds properly on FreeBSD?
> 
> Thanks!

Just one typo below:

> diff --git a/gdb/fbsd-nat.c b/gdb/fbsd-nat.c
> index 265175a769..1a36414837 100644
> --- a/gdb/fbsd-nat.c
> +++ b/gdb/fbsd-nat.c
> @@ -1163,8 +1163,9 @@ fbsd_remove_exec_catchpoint (struct target_ops *self, int pid)
> 
>  #ifdef HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE
>  static int
> -fbsd_set_syscall_catchpoint (struct target_ops *self, int pid, int needed,
> -			     int any_count, int table_size, int *table)
> +fbsd_set_syscall_catchpoint (struct target_ops *self, int pid, bool needed,
> +			     int any_count,
> +			     gdb::array_view<const int> syscall_counts))

Double close paren here should be a single, but builds fine aside from that, thanks!

-- 
John Baldwin


  reply	other threads:[~2017-12-06 22:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-30 15:32 [PATCH 0/2] Make make-target-delegates grok C++ type names better Pedro Alves
2017-10-30 15:32 ` [PATCH 1/2] Make make-target-delegates grok namespace scope op and template params Pedro Alves
2017-10-30 16:02   ` Simon Marchi
2017-12-03  0:51     ` Simon Marchi
2017-12-03 11:58       ` Pedro Alves
2017-12-03 18:00         ` Simon Marchi
2017-10-30 15:32 ` [PATCH 2/2] target_set_syscall_catchpoint, use gdb::array_view and bool Pedro Alves
2017-10-30 15:59   ` John Baldwin
2017-12-03 18:18     ` Simon Marchi
2017-12-06 22:38       ` John Baldwin [this message]
2017-12-06 22:50         ` Simon Marchi
2017-10-30 15:59   ` Simon Marchi
2017-10-30 17:05 ` [PATCH] Remove mem_region_vector typedef Simon Marchi
2017-12-03 18:06   ` Simon Marchi

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=4f91f6f2-9b0f-d750-5d03-30fc23c0613d@FreeBSD.org \
    --to=jhb@freebsd.org \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    --cc=simark@simark.ca \
    /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