From: Simon Marchi <simon.marchi@polymtl.ca>
To: Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org, sergiodj@redhat.com
Subject: Re: [RFA v2 3/4] Use std::vector in syscall_catchpoint
Date: Fri, 21 Jul 2017 20:37:00 -0000 [thread overview]
Message-ID: <547db13b31e162956b647e5e5a3929dd@polymtl.ca> (raw)
In-Reply-To: <20170719203225.6714-4-tom@tromey.com>
Hi Tom,
Just a nit in addition to what Sergio pointed out, otherwise LGTM too.
On 2017-07-19 22:32, Tom Tromey wrote:
> @@ -385,23 +355,17 @@ print_recreate_catch_syscall (struct breakpoint
> *b, struct ui_file *fp)
>
> fprintf_unfiltered (fp, "catch syscall");
>
> - if (c->syscalls_to_be_caught)
> + for (int iter : c->syscalls_to_be_caught)
> {
> - int i, iter;
> -
> - for (i = 0;
> - VEC_iterate (int, c->syscalls_to_be_caught, i, iter);
> - i++)
> - {
> - struct syscall s;
> + struct syscall s;
>
> - get_syscall_by_number (gdbarch, iter, &s);
> - if (s.name)
> - fprintf_unfiltered (fp, " %s", s.name);
> - else
> - fprintf_unfiltered (fp, " %d", s.number);
> - }
> + get_syscall_by_number (gdbarch, iter, &s);
> + if (s.name)
Could you add a != NULL while at it?
Thanks,
Simon
next prev parent reply other threads:[~2017-07-21 20:37 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-19 20:53 [RFA v2 0/4] C++-ify some breakpoint subclasses a bit more Tom Tromey
2017-07-19 20:51 ` [RFA v2 1/4] C++-ify break-catch-sig Tom Tromey
2017-07-20 18:13 ` Sergio Durigan Junior
2017-07-21 19:53 ` Simon Marchi
2017-07-22 3:53 ` Tom Tromey
2017-07-21 19:43 ` Simon Marchi
2017-07-19 20:53 ` [RFA v2 3/4] Use std::vector in syscall_catchpoint Tom Tromey
2017-07-20 17:55 ` Sergio Durigan Junior
2017-07-21 20:37 ` Simon Marchi [this message]
2017-07-19 20:53 ` [RFA v2 2/4] C++-ify break-catch-throw Tom Tromey
2017-07-20 17:57 ` Sergio Durigan Junior
2017-07-21 20:20 ` Simon Marchi
2017-07-19 20:54 ` [RFA v2 4/4] Use std::vector in struct catch_syscall_inferior_data Tom Tromey
2017-07-20 16:58 ` Sergio Durigan Junior
2017-07-22 3:43 ` Tom Tromey
2017-07-21 20:49 ` 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=547db13b31e162956b647e5e5a3929dd@polymtl.ca \
--to=simon.marchi@polymtl.ca \
--cc=gdb-patches@sourceware.org \
--cc=sergiodj@redhat.com \
--cc=tom@tromey.com \
/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